Logout from menu, cleaned code