Redirect the user on sign-out according to referrer