title: How to add some action after login (and before redirection)?
body: <p>trying to develop some sort of login tracker for my cakephp application.</p>
  
  <p>i know that i need code like:</p>
  
  <pre><code>$this-&gt;data['LoginSession']['username'] = $_SERVER['REMOTE_ADDR'];
  $this-&gt;data['LoginSession']['ipAddress'] = $_SERVER['REMOTE_ADDR'];
  $this-&gt;LoginSession-&gt;save($this-&gt;data);
  </code></pre>
  
  <p>... in (i guess) users_controller, but don't know exactly where. </p>
  
  <p>also i would like to track successful, but also unsuccessful logins.</p>
  
  <p>can you help me with this please? thank you in advance!</p>