Fix “Logout” function in MainMenu.