Launch the program and then use a Do... Until loop to loop until the login window exists. Inside the loop, use WinGetHandle to check if the pop-up exists and if so click the OK button. After the If statement checking for the pop-up add a sleep for 10 seconds.
Quick example:
Run('Program.exe')
Do
Local $hWnd = WinGetHandle('Pop-up Window Title')
If IsHWnd($hWnd) = 1 Then
If WinActive($hWnd) = 0 Then WinActivate($hWnd)
ControlClick($hWnd, '', '[CLASS:Button; INSTANCE:1]')
EndIf
Sleep(10000)
Until WinExists('Login Window Title') = 1