Removes last slash from returnUrl