Adjusted intent flags and added onBackPressed prompt.