CORE-4591: redirect the user back to the originally requested URL after authentication