Automatic logout on back pressed from main