CORE-4259: ensure that logout redirection only occurs after the RPC call used to save the user session has returned