title: Changing the default login setup with CakePHP
body: <p>I have something that I thought was a relatively common problem, but after researching the issue, it appears not to be as easy as thought.</p>
  
  <p>I have a CakePHP application (using version 1.2.7) and I am trying to change the standard login procedure using the Auth Component.  I would like to use a persistent login screen ( like this Jquery plugin : <a href="http://web-kreation.com/demos/Sliding_login_panel_jquery/" rel="nofollow noreferrer">http://web-kreation.com/demos/Sliding_login_panel_jquery/</a> ) which my users would use to login.</p>
  
  <p>In Cake terminology, I would like to be able to login to the Auth component from the /pages/home screen but Cakephp keeps redirecting to the /users/login.</p>
  
  <p>In My App Controller :</p>
  
  <pre><code> function beforeFilter()
   {
    ...
    $this-&gt;Auth-&gt;loginAction = array( 'controller' =&gt; 'users', 'action' =&gt; 'login' );
    $this-&gt;Auth-&gt;loginRedirect = array( 'controller' =&gt; 'pages', 'action' =&gt; 'home' );
    $this-&gt;Auth-&gt;logoutRedirect  = array( 'controller' =&gt; 'pages', 'action' =&gt; 'home' );
    $this-&gt;Auth-&gt;autoRedirect = false;
    ...
   }
  </code></pre>
  
  <p>If I change the loginAction to /pages/home. the login does not work, in fact it does not even post to the /users/login method. Not exactly sure what has happened.</p>
  
  <p>My question is this :</p>
  
  <p><strong>How do I make a login form located at www.EXAMPLE.com/ which will return to the same location on successful and unsuccessful login?</strong></p>
  
  <p>I would prefer not to have it redirect to /users/login or have that show up in the URL at all.</p>