Changed way Google sign in checks if user is undefined