handle back button, moving app into the background