user logout optimailization