title: How to use two diffrent table for authentication in cakePHP
body: <p>I am creating admin and api using cakePHP. Both admin and api side have login system.
  There are two tables, one is <code>admins</code> that is for admin login. Another is <code>users</code> that is for api side login. 
  So what I want is, if user come through admin side then it should chek from <code>admins</code> table and if users are coming from api it should check from <code>users</code> table. 
  I have separated <code>admin</code> and <code>api</code> functionality in two different folder. 
  So normal admin functionality I am working on <code>controller</code> folder. For <code>api</code> functionality I have created another folder inside <code>controller</code> folder, named as <code>Api</code>. 
  So there are two <code>AppController.php</code> I am using. One is for <code>admin</code> and another is for api. </p>
  
  <p>Here is how I am calling auth in <code>Controller\AppController.php</code> for admin</p>
  
  <pre><code>$this-&gt;loadComponent('Auth',[
          'authenticate' =&gt; [
              'Form' =&gt; [
                  'fields' =&gt; [
                      'username' =&gt; 'email',
                      'password' =&gt; 'password'
                  ]
              ]
          ],
          'loginAction' =&gt; [
                  'controller' =&gt; 'admins',
                  'action'     =&gt; 'login'
              ]
      ]);
  </code></pre>
  
  <p>This is how I am calling auth component for api login in <code>Controller\App\AppController.php</code></p>
  
  <pre><code>$this-&gt;loadComponent('Auth',[
          'authenticate' =&gt; [
              'Form' =&gt; [
                  'fields' =&gt; [
                      'username' =&gt; 'email',
                      'password' =&gt; 'password'
                  ]
              ]
          ],
          'loginAction' =&gt; [
                  'controller' =&gt; 'user',
                  'action'     =&gt; 'login'
              ]
      ]);
  </code></pre>
  
  <p>Here is the login functionality for admin </p>
  
  <pre><code>public function login()
  {
      $user = $this-&gt;request-&gt;getSession()-&gt;read('Auth.User');
      if($user){
           $this-&gt;redirect(array('controller' =&gt; 'Venues'));
      }
      if ($this-&gt;request-&gt;is('post')) {
          $user = $this-&gt;Auth-&gt;identify();
          if($user){
              $this-&gt;Auth-&gt;setUser($user);
          }
          else{
              $this-&gt;Flash-&gt;error('Incorrect Login credential');
          }
      }
  }
  </code></pre>
  
  <p>Here is login functionlity for api </p>
  
  <pre><code>public function login()
  {
      $user = $this-&gt;request-&gt;getSession()-&gt;read('Auth.User');
      if($user){
           $this-&gt;redirect(array('controller' =&gt; 'Venues'));
      }
      if ($this-&gt;request-&gt;is('post')) {
          $user = $this-&gt;Auth-&gt;identify();
          if($user){
              $this-&gt;Auth-&gt;setUser($user);
          }
          else{
              $this-&gt;Flash-&gt;error('Incorrect Login credential');
          }
      }
  }
  </code></pre>
  
  <p>I am calling <code>$this-&gt;Auth-&gt;identify();</code> from both login function. So maybe this is the issue. Is is possible to use different table for different auth. </p>