title: Pass query string when user is redirected to login
body: <p>I have a CakePHP website at the following url: <a href="http://driz.co.uk/" rel="nofollow">http://driz.co.uk/</a></p>
  
  <p>When a user (me) tries to access the portfolio admin at <a href="http://driz.co.uk/admin/portfolio/" rel="nofollow">http://driz.co.uk/admin/portfolio/</a> they are automatically taken to the admin login at <a href="http://driz.co.uk/admin/login" rel="nofollow">http://driz.co.uk/admin/login</a> because the admin methods all require authentication.</p>
  
  <p>What I want to do is pass the query string of the last page as well so when that redirect happens it will say this in the URL: <a href="http://driz.co.uk/admin/login?continue=/admin/portfolio/" rel="nofollow">http://driz.co.uk/admin/login?continue=/admin/portfolio/</a></p>
  
  <p>How would I do this?</p>
  
  <p>I've tried:</p>
  
  <pre><code>        $this-&gt;Auth-&gt;loginAction = array(
              'admin' =&gt; true,
              'prefix'=&gt; 'admin',
              'controller' =&gt; 'users',
              'action' =&gt; 'login',
              '?' =&gt; array('continue' =&gt; $this-&gt;referer())
          );
  </code></pre>
  
  <p>But that just causes a redirect loop (not sure why it's even trying to do a redirect :/</p>
  
  <p><strong>Note: I know CakePHP automatically redirects the user after successful login BUT I want to add the query string as I'm using it for extra jazz in the app.</strong></p>
  
  <p>Thanks</p>