title: CakePHP 2.4 Auth->login(): Creates an empty record in DB
body: <p>I'm upgrading an old CakePHP app to CakePHP 2.4 the login
  I got the user model (called Participant) working to login in a user but it also adds a new record in the database (with empty data) </p>
  
  <p>AppController.php</p>
  
  <pre><code>// authorization
          $this-&gt;Auth-&gt;authorize = 'controller';
  
          $this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'participants', 'action' =&gt; 'login');
  
          $this-&gt;Auth-&gt;userModel = 'Participant';
          $this-&gt;Auth-&gt;userScope = array('Participant.validate_email' =&gt; 'yes');
          $this-&gt;Auth-&gt;fields = array('username' =&gt; 'email', 'password' =&gt; 'password');
  
          $this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'pages', 'action' =&gt; 'welcome');
          $this-&gt;Auth-&gt;logoutRedirect =  array('controller' =&gt; 'pages', 'action' =&gt; 'welcome');
          $this-&gt;autoRedirect = false;   
  
          $this-&gt;Auth-&gt;authenticate = array('Form' =&gt; array(
                  'fields' =&gt; array('username' =&gt; 'email', 'password' =&gt; 'password'), 
                  'userModel' =&gt; 'Participant'
              ));
  </code></pre>
  
  <p>ParticipantController.php</p>
  
  <pre><code>public function login() {
      if (!(empty($this-&gt;data)) &amp;&amp; $this-&gt;Auth-&gt;login()) {
          $this-&gt;log('Logged in with success', 'access');
          $this-&gt;Participant-&gt;id = $this-&gt;Session-&gt;read('Auth.Participant.id');
          $this-&gt;Participant-&gt;saveField('last_login', date(DATE_ATOM));
          $this-&gt;redirect($this-&gt;Auth-&gt;redirect(), null, true);
      }
  }
  </code></pre>
  
  <p>Edit1: How do I prevent a new user being created every time someone logs in? </p>
  
  <p>Edit2: Session is has the correct user select also login in with false credentials does not work. Every login triggers a new record to be added in database</p>