Back button now switches to main menu or finishes the activity;