I have made an option in menu item to sign out from an activity and it will be redirected to Login page. However, when back button is pressed, it shows the activity which supposed to be shown only after signed in. Please advice what went wrong. The menu code is given below
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.exit:
uAuth.signOut();
return true;
default:
return super.onOptionsItemSelected(item);
}
}