Added functionallity to the exit button in the menu