title: Multiple Routing Prefixes + loginAction Not Working
body: <p>I have searched and though people have asked similar if not the exact same question on this site and elsewhere, several of those questions have gone unanswered and the rest simply don't apply to me (different error, old cake version, etc). </p>
  
  <p>I have two routing prefixes set up in my core.php. Those are 'admin' and 'moderate'. I want ALL users to login via <code>/users/login</code> and be redirected afterwards to <code>/account</code>.</p>
  
  <p>When I go to a standard (non-prefixed) page that requires authentication such as <code>/account</code>, then I am redirected to <code>/admin/users/login</code> (I do not want the prefix).</p>
  
  <p>After I login I am successfully redirected to <code>/account</code>. (At least that part is working)</p>
  
  <p>Here is my AppController code</p>
  
  <pre><code>public $components = array('Session',
     'Auth' =&gt; array(
          'loginAction' =&gt; array('prefix' =&gt; false, 'admin' =&gt; false, 'moderate' =&gt; false, 'controller' =&gt; 'users', 'action' =&gt; 'login'),
          'loginRedirect' =&gt; array('prefix' =&gt; false, 'admin' =&gt; false, 'moderate' =&gt; false, 'controller' =&gt; 'account', 'action' =&gt; 'index'),
          'logoutRedirect' =&gt; array('controller' =&gt; 'index', 'prefix' =&gt; false, 'admin' =&gt; false, 'moderate' =&gt; false),
          'authError' =&gt; "You can't access that page",
          'authorize' =&gt; array('Controller')
      )
  ); // components
  </code></pre>
  
  <p>I also tried changing all the '<strong>false</strong>' to '<strong>null</strong>'. No dice. I'm using CakePHP 2.2.4</p>
  
  <p><strong>EDIT AS OF 2/11/14</strong>
  Because people are still answering I just wanted to note that this question is RESOLVED. I never figured out what the exact issue was so I never posted an official/accepted answer. I suspect it was an issue with my routing. The AppController code I provided above was correct.</p>