It does this when the launcher is having problems connecting to the login and related servers. The launcher is a stripped-down internet browser, and what's going on is more or less the same thing as when a site or your connection to it gets bogged down and it stops loading halfway through. There's nothing much you can do about it generally, since it's usually either something wrong with your connection/routing, or the login servers are being hammered by traffic. Just have to keep trying until you get through.