fixed login issue when a user is signing in or signing up