CakePHP 2.0注销

Any ideas why if you try and access a logout link logged out in CakePHP 2.0 it requests authentication? instead of just realising you're logged out and then sending you off to the redirect logout page like normal.

so e.g:

public function logout()
{
    $this->redirect($this->Auth->logout());
}

and it's been allowed here:

public function beforeFilter()
{
    parent::beforeFilter();
    $this->Auth->allow('add','login','logout');
}

This means that if a non-logged in user went to the logout page it would ask them to login at which point they would then automatically logged out because they have requested the logout page and authenticated against that.

This didn't happen in 1.3. Any ideas?

Thanks

Solved the problem! The issue was it actually sending me to another page that requested authentication hence the login request. Not sure why it logged me into the logout method though? So I did the following:

public function beforeFilter()
{
    parent::beforeFilter();
    $this->Auth->allow('add','login','logout');
}

public function logout()
{

    if($this->Auth->user())
    {
        $this->redirect($this->Auth->logout());
    }
    else
    {
        $this->redirect(array('controller'=>'pages','action' => 'display','home'));
        $this->Session->setFlash(__('Not logged in'), 'default', array(), 'auth');
    }
}