title: Redirecting to login doesn't work if current url already contains ReturnUrl
body: <p><strong>Some background:</strong>
  Our client wanted a number of actions to return to the previous action when done. For example, if he was on a list view of objects and he clicked on "create new object" button, he wanted to return to the list view after he fills and saves the form or after he cancels the action. We implemented it by mimicking the <code>ReturnUrl</code> behavior that is used with unauthorized access attempts (adding current address as an url encoded query parameter).</p>
  
  <p><strong>The problem:</strong>
  If I'm not authorized (or in other words not logged in) and try to access an action that requires it I get redirected to login page (as I should) and current url gets put into <code>ReturnUrl</code> param. However, when the current address already contains <code>ReturnUrl</code> query param, I'm not being redirected anywhere and instead I get a blank page. Is there any reason why this happens?</p>
  
  <p>The expected result would be being redirected to the login screen with the (url encoded version of) current url put into the <code>ReturnUrl</code> param (regardless of whether the current url contained its own <code>ReturnUrl</code> param or not)</p>
  
  <p>Is there some way to make it work as expected? Sure in theory I could rename the "ReturnUrl" param (in my own actions) to something else, but we used such parameter in so many places already that renaming them is not going to be an easy task. Besides, I don't really understand why this doesn't work in the first place.</p>
  
  <p>P.S. The problem only occurs if I name the parameter <code>ReturnUrl</code>, if it's <code>returnUrl</code> everything works as it should.</p>
  
  <hr>
  
  <p>Edit: This question was previously called: Unauthorized access to restricted actions returns nothing if the url contains parameter called ReturnUrl. I changed the title to make it easier to understand.</p>
  
  <hr>
  
  <p>Edit: This question might be a duplicate of <a href="https://stackoverflow.com/questions/4478570/unauthorized-request-does-not-redirect-to-login-page-with-returnurl-query-string?rq=1">Unauthorized request does not redirect to login page with returnUrl query string parameter</a>. I'll have to investigate further if the solution provided there solves my issue or not. <strong>Update: The wording is similar, but the problem is different after all, so it's not a duplicate.</strong></p>