Fixed all the login bugs.