Redirect to the proper URL for endpoints which require login