title: CakePHP 2.2 auth component
body: <p>Hi I am very new to CakePHP, I wrote a basic login page using cakephp2.2.</p>
  
  <p>This is my <code>AppController</code>:</p>
  
  <pre><code>class AppController extends Controller {
  
      var $components = array('Auth', 'Session');
      var $helpers = array('Form');
      public function appError($error) {
          //Do whatever you want
          debug($error);
      }
  
  }
  </code></pre>
  
  <p>My UsersController:app\controller\UsersController.php</p>
  
  <pre><code>class UsersController extends AppController {
      var $name = 'Users';
      var $components = array('Auth'); // Not necessary if declared in your app controller
      /**
      * The AuthComponent provides the needed functionality
      * for login, so you can leave this function blank.
      */
      function login() {
      }
      function logout() {
          $this-&gt;redirect($this-&gt;Auth-&gt;logout());
      }
  }
  </code></pre>
  
  <p>And my view:app\user\login.ctp</p>
  
  <pre><code>&lt;?php
  echo $this-&gt;Session-&gt;flash('auth');
  echo $this-&gt;Form-&gt;create('User');
  echo $this-&gt;Form-&gt;input('username');
  echo $this-&gt;Form-&gt;input('password');
  echo $this-&gt;Form-&gt;end('Login');
  ?&gt;
  </code></pre>
  
  <p>I am getting: the hole UserController code and below error</p>
  
  <p>\app\Controller\AppController.php (line 41)
  object(MissingControllerException) {</p>
  
  <p>}</p>