Fixed login bugs.