generally login servers run a refresh every hour or so, though I think that time can be changed to whatever you like. This prevents the server from blowing up due to lag and too many connection requests at once. If you get caught trying to log in during one of those refreshes you fail to connect. Just wait like 5 minutes and try again.