title: Cakephp 2.x does not login manually
body: <p>I am trying to integrate facebook authentication to my Cakephp 2.2.4 app and once the facebook authentication is done, I am trying to create the user and login the user manually, I see that  though the below code is creating a auth session, i.e., $this->Auth->user() contains all the data , it is not logging the user into the app, i.e, I am not able to access other functions of the app</p>
  
  <pre><code>$user = $this-&gt;User-&gt;findById($user_id);
          $this-&gt;Auth-&gt;login($user);
  </code></pre>
  
  <p>this is what I am using to manually login and the user saved does not contain a username and password</p>
  
  <p>this is in my AppController.php</p>
  
  <pre><code>class AppController extends Controller {
  public $components = array(
  'Session',
  'Auth'=&gt;array(
       'loginRedirect'=&gt;array('controller'=&gt;'Users','action'=&gt;'dashboard'),
       'logoutRedirect'=&gt;array('controller'=&gt;'Users','action'=&gt;'login'),
       'authError'=&gt;'You can\'t access that page',
       'authenticate' =&gt; array(
          'Form' =&gt; array(
              'fields' =&gt; array('username' =&gt; 'email')
          ),'Basic'),
       'authorize'=&gt;array('controller')
      ),
  'RequestHandler'    
  );
  
  public $helpers = array('Js' =&gt; array('Jquery'),'Html','Form');
  
  public function isAuthorized($user){
      return TRUE ;
  }
  
  public function beforeFilter(){
  
      // $this-&gt;Auth-&gt;allow('index','view');
      // $this-&gt;set('logged_in',$this-&gt;Auth-&gt;loggedIn());
      // $this-&gt;set('current_user',$this-&gt;Auth-&gt;user());
  }
  </code></pre>
  
  <p>}</p>