fixed bug with new user getting an error when logging in for first time