title: MVC 4 returns 404 on returnUrl from Login Screen
body: <p>I have a simple MVC application - a list of employees, buttons to delete the employee, and login screen</p>
  
  <p>When the user presses the button to delete the Employee they are requested to Login</p>
  
  <p>This takes them away from the EmployeeController to an AccountController that handles the login. The returnUrl is also passed to this. The user gets authenticated successfully and the Account controller goes to Redirect to the ReturnUrl and this is where it throws a 404.</p>
  
  <p>The returnUrl = /Employees/Delete/127 - the id of the employee. As far as I can see this is correctly configured in the controller and RouteConfig.</p>
  
  <p>When I remove the [Authorise] attribute it works just fine. So I suspect it must be with the redirect but I do not understand why?</p>
  
  <p><strong>EDIT</strong>:
  I also tried HttpPost in the using FormMethod.Post in the view but it made no difference but after leaving the Login I don't know it it os post or get - or could the Redirect to the return url be generating a Get and not a post?</p>
  
  <p><strong>EDIT AGAIN</strong>: Thinking about this it is probably not a good design. I am requesting the user to Authorize after they have pressed the delete button. I should probably not expose the delete button unless they are already Authorized but is it possible to do anyway?</p>
  
  <p><img src="https://i.stack.imgur.com/LPEgE.png" alt="404 error"></p>
  
  <p><img src="https://i.stack.imgur.com/J4VFf.png" alt="Account Controller with redirect"></p>
  
  <p><img src="https://i.stack.imgur.com/8a1mH.png" alt="view generating the delete button"></p>
  
  <p><img src="https://i.stack.imgur.com/x4Q4d.png" alt="employee controller with the Delete action"></p>
  
  <p><img src="https://i.stack.imgur.com/pMTRL.png" alt="generated html"></p>
  
  <p><img src="https://i.stack.imgur.com/ncIkp.png" alt="route config"></p>