SSO: Change to handle both login/logout synchronously