Fixed errors with user login