Logging out improved