Fix up the login/logout flow. Check chat for app keys.