title: Cakephp admin and user login simultaneously not working correctly
body: <p>I have two type of users in my website.
  1.User (Frontend)
  2.Admin (Backend)</p>
  
  <p>I used cakephp auth component for login both type of user.
  my problem is that when i login using one type of users i will automatically login to other type of user for example i login as user from frontend but when i refresh backed it will show me logedin and same problem with admin type of user.</p>
  
  <p>Below are my auth Code separate for admin and user.</p>
  
  <p>This is AppController.php file in app/Controller</p>
  
  <pre><code>public function beforeFilter() {
      if($this-&gt;Auth-&gt;user()){
      $this-&gt;set('logged_in', true);
      }else{
      $this-&gt;set('logged_in', false);
      }
      //Configure AuthComponent
      $this-&gt;Auth-&gt;userScope = array('User.is_active' =&gt; '1');
      $this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'users', 'action' =&gt; 'signin','plugin' =&gt; 'umgmt');
      $this-&gt;Auth-&gt;logoutRedirect = array('controller' =&gt; 'users', 'action' =&gt; 'signin','plugin' =&gt; 'umgmt');
      $this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'users', 'action' =&gt; 'index','plugin' =&gt; false);
  
      }
  </code></pre>
  
  <p>This is my admin plugin controller code </p>
  
  <pre><code>public $components = array(
      'Auth' =&gt; array(
              'authenticate' =&gt; array(
                  'Form' =&gt; array(
                      'userModel' =&gt; 'Admin',
                      'fields' =&gt; array(
                          'username' =&gt; 'username',
                          'password' =&gt; 'password'
                      ),
                       'scope'=&gt;array('Admin.is_active' =&gt; 1)
                  )
              )
          )
      );
  
  
  public function beforeFilter() {
  
      $this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'admins', 'action' =&gt; 'index');
      $this-&gt;Auth-&gt;logoutRedirect = array('controller' =&gt; 'admins', 'action' =&gt; 'index');
      $this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'admins', 'action' =&gt; 'dashboard');
  
  }
  </code></pre>
  
  <p>I am using cakephp 2.4.1</p>
  
  <p>Please help me</p>