Prevent app-switch auth in sandbox environment. Clean up some flow issues in app-switch auth.