added isLoggingIn constraint