Detect when a user needs to sign in.