Add code for Mojang authentication.

Sadly, it's the legacy one, so your password is still sent in
plaintext. I'll have to fix this come 1.6, maybe I'll do it sooner...
integrate authentication with launcher

Now it works perfectly fine!