title: CakePHP send current url as query string when user is redirected to login
body: <p>In CakePHP when a user tries to access an action that is protected with the Auth component they are redirected to the login page.</p>
  
  <p>So for example if I tried to acccess: <code>domain.com/posts/add</code> it would take me to <code>domain.com/users/login</code></p>
  
  <p>What I want to do is when anything like this happens is add a query string with the previous url like so: <code>domain.com/users/login?back=/posts/add</code> This is because I have disabled <code>autoRedirect</code> so that the redirect is no longer based on the session.</p>
  
  <p>How would I add this query string though? Thanks</p>
  
  <p><strong>Just to confirm I know how to redirect the user using the query string in the login method just not how to send the query string in the first place when a user is sent to the login page from action that requires authorisation.</strong></p>