title: CakePhp 3.0 unable to login
body: <p>I'm new to CakePhp framework and followed the blog tutorial.
  Everything went smooth until authentication part.</p>
  
  <p>The following two lines were the problem:</p>
  
  <pre><code>&lt;?= $this-&gt;Form-&gt;input('Usuario') ?&gt;
  &lt;?= $this-&gt;Form-&gt;input('Contraseña') ?&gt;
  </code></pre>
  
  <p>The correct lines are:</p>
  
  <pre><code>&lt;?= $this-&gt;Form-&gt;input('username') ?&gt;
  &lt;?= $this-&gt;Form-&gt;input('password') ?&gt;
  </code></pre>
  
  <p>This is my login method from UsersControllers.php, the debug line always returns false.</p>
  
  <pre><code>public function login()
      {
          if ($this-&gt;request-&gt;is('post')) {
              debug($this-&gt;Auth-&gt;identify());
              $user = $this-&gt;Auth-&gt;identify();
              if ($user) {
                  $this-&gt;Auth-&gt;setUser($user);
                  return $this-&gt;redirect($this-&gt;Auth-&gt;redirectUrl());
              }
              $this-&gt;Flash-&gt;error(__('Usuario o contraseña inválida, intente nuevamente'));
          }
      }
  </code></pre>
  
  <p>This is my user class
  I had to change the line protected $_accessible = ['*' => true]; as appears in the tutorial, otherwise users wouldn't be saved.</p>
  
  <pre><code>class User extends Entity
  {
      // Make all fields mass assignable for now.
      protected $_accessible = ['username' =&gt; true,'password'=&gt;true,'role'=&gt;true,'created'=&gt;true,'modified'=&gt;true];
      // ...
      protected function _setPassword($password)
      {
          return (new DefaultPasswordHasher)-&gt;hash($password);
      }
      // ...
  }
  </code></pre>
  
  <p>This is my login.ctp</p>
  
  <pre><code>&lt;div class="users form"&gt;
      &lt;?= $this-&gt;Flash-&gt;render('auth') ?&gt;
      &lt;?= $this-&gt;Form-&gt;create() ?&gt;
      &lt;fieldset&gt;
          &lt;legend&gt;&lt;?= __('Ingrese su usuario y contraseña') ?&gt;&lt;/legend&gt;
          &lt;?= $this-&gt;Form-&gt;input('Usuario') ?&gt;
          &lt;?= $this-&gt;Form-&gt;input('Contraseña') ?&gt;
      &lt;/fieldset&gt;
      &lt;?= $this-&gt;Form-&gt;button(__('Login')); ?&gt;
      &lt;?= $this-&gt;Form-&gt;end() ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>These are my AppController.php methods:</p>
  
  <pre><code>public function initialize()
  {
      $this-&gt;loadComponent('Flash');
      $this-&gt;loadComponent('Auth', [
      'loginRedirect' =&gt; [
      'controller' =&gt; 'Expedientes',
      'action' =&gt; 'index'
      ],
      'logoutRedirect' =&gt; [
      'controller' =&gt; 'Pages',
      'action' =&gt; 'display',
      'home'
      ]
      ]);
  }
  
  public function beforeFilter(Event $event)
  {
     $this-&gt;Auth-&gt;allow(['index', 'view']);
  }
  </code></pre>
  
  <p>At this point I can add users, their passwords are hashed but I can't login.
  Any help will be greatly appreciated.
  Thanks in advance.</p>