Fix check for successful sign in