Presumably, it doesn't work if the box comes up directly after login because the game is halted before the connection to the login server is even attempted.
Since that message isn't meant to be skipped, nothing is called when it is, and so...black screen and eventual timeout due to no network activity. The same thing happens if you get rid of the "Incorrect username or password" box in this way; black screen because the login box wasn't called by the Ok button.
In which case, a quick hack that forces a resend or three for authentication might help. Just sayin'.
Or it could be that the message and some coding attached to it actively blocks authentication efforts, to...er, thwart anyone trying to skip it.
'course, none of that explains a: why it works for some at login and not others, and b: why you're not straight up disconnected from the server when it happens in the lobby or server screen :v
It might be that it only works for x64 O/Ses and not x32, since xtrap and s4 both function slightly differently in an x64 environment. If more people would report what they're using, we might be able to see a pattern.
(I'm using WinXP x32, and it doesn't work from the login screen for me)