closing main activity when pressing back button