Handle back button presses.