title: Captcha code is not working in Login Form in CakePhp
body: <p>I am using that code for captcha: <a href="https://github.com/solutudo/cakephp-captcha" rel="nofollow">https://github.com/solutudo/cakephp-captcha</a></p>
  
  <p>That's my code in <code>user_controller.php</code> in login action:</p>
  
  <pre><code>    public function login() {
          if (!empty($this-&gt;data)
              &amp;&amp; !empty($this-&gt;Auth-&gt;data['User']['username'])
              &amp;&amp; !empty($this-&gt;Auth-&gt;data['User']['password'])) {
              // captcha code
              if ($this-&gt;RequestHandler-&gt;isPost()) {
                  $this-&gt;User-&gt;setCaptcha($this-&gt;Captcha-&gt;getCode());
                  $this-&gt;User-&gt;set($this-&gt;data);
                  if ($this-&gt;User-&gt;validates()) {
                      // captcha code 
                      $user = $this-&gt;User-&gt;find('first', array(
                          'conditions' =&gt; array(
                              'User.email' =&gt; $this-&gt;Auth-&gt;data['User']['username'],
                              'User.password' =&gt; $this-&gt;Auth-&gt;data['User']['password']),
                          'recursive' =&gt; -1
                          ));
                      if (!empty($user) &amp;&amp; $this-&gt;Auth-&gt;login($user)) {
                          if ($this-&gt;Auth-&gt;autoRedirect) {            
                              $this-&gt;redirect($this-&gt;Auth-&gt;redirect());
                          }
                      } else {
                          $this-&gt;Session-&gt;setFlash($this-&gt;Auth-&gt;loginError, $this-&gt;Auth-&gt;flashElement, array(), 'auth');
                      }
                  }
              }
          }
      }
  </code></pre>
  
  <p>View user.ctp</p>
  
  <pre><code>    &lt;?php
      echo $this-&gt;Form-&gt;create(array('action'=&gt;'login'));
      echo $this-&gt;Form-&gt;input('username');
      echo $this-&gt;Form-&gt;input('password');
      // captcha code
      echo $this-&gt;Html-&gt;image('captcha.jpg', array('style' =&gt; 'padding: 0.5%;'));
      echo $this-&gt;Form-&gt;input('captcha');
      // captcha code
      echo $this-&gt;Form-&gt;end('Login');
      ?&gt;
  </code></pre>
  
  <p>Model User.php</p>
  
  <pre><code>    &lt;?php
      class User extends AppModel {
          public $actsAs = array(
              'Captcha' =&gt; array(
                  'field' =&gt; 'captcha',
                  'error' =&gt; 'Captcha code entered invalid'
              )
          );
      }
      ?&gt;
  </code></pre>
  
  <p>captcha code validation and captcha is not working, without entering captcha I am able to login, I have used that same code in add function with the same controller <code>user_controller.php</code>, and that time captcha code was working.</p>
  
  <p>I want user to login after entering right captcha.</p>