Properly detect logged out state for SSO