title: CakePHP Ajax Login
body: <p>Since I'm new to cake, I understand there is a log of magic that happens with a users controller and the <code>login()</code> function using <code>Auth</code>.</p>
  
  <p>I want to have behavior where I can Ajax post the credentials to users/login, and simply return 1 if it is successful, and 0 if it is not. No redirects, no displays, nothing. I can't seem to make it stop the redirect despite a <code>$this-&gt;render(false)</code>.</p>
  
  <p>I don't need to make non ajax login requests, so there is no need to test it in the controller. </p>
  
  <p>Could someone suggest what code is needed within the <code>login()</code> function in the user controller? </p>
  
  <p>Thanks!</p>