enable back button to go previous page and exit the app on home page