fix user login bugs