logout edited in main menu

avoid ungraceful d/c