Fixed user login bugs.