title: Cakephp 3 - force logout on session timeout
body: <p>I'm struggling with the auth component.
  My authentication is managed inside a plugin.
  In the plugin's AppController.php I have set up this :</p>
  
  <pre><code>    $this-&gt;loadComponent('Auth', [
                                     'authenticate'      =&gt; [ 'Form' =&gt; [ 'userModel' =&gt; 'BasUsers' ] ],
                                     'loginAction'       =&gt; [ 'controller' =&gt; 'BasUsers', 'action' =&gt; 'login', 'plugin' =&gt; 'Basic' ],            
                                     'userModel'         =&gt; 'BasUsers',
                                     'loginRedirect'     =&gt; '/pages/home',
                                     'logoutRedirect'    =&gt; [ 'controller' =&gt; 'BasUsers', 'action' =&gt; 'login', 'plugin' =&gt; 'Basic' ],
                                     'unauthorizedRedirect' =&gt; [ 'controller' =&gt; 'pages', 'action' =&gt; 'not-authorized' ],
                                     'authError'         =&gt; false,
                                     'authorize' =&gt; ['Controller'],
                                  ]
                           );
  </code></pre>
  
  <p>I cannot manage to force a logout ( redirect to the login page ) when the session expires.</p>
  
  <p>When the session ends, trying $this->request->session()->read( 'Auth.User.bas_users_role_id' ) returns null, but the controller / action is executed.</p>
  
  <p>What am I missing ?
  Thanks.</p>