AccessControl and AuthManager

I have a problem.
I am using yii auth manager (https://www.yiiframework.com/extension/auth)
I have defined rules and actions for every user.
However when the session is expired this auth manager does not logout’s the persons and still displays the pages restricted to logged in users only.

To Avoid this. I have defined

public function filters() {
    return array(
        'accessControl',
        'postOnly + delete', // we only allow deletion via POST request
    );
}

and

public function accessRules() {
    return array(
        array('allow',
            'actions' => array('*'),
            'roles' => array('@'),
        ),
        array('allow',
            'actions' => array('login, logout'),
            'users' => array('*'),
        ),
        array('deny',
            'actions' => array('*'),
            'users' => array('?'),
        ),
    );
}

This works fine and immediately log out the user.
But after login it’s not allowing any user to view any page.

Can any body help me out?

I know I’m doing it wrong and cannot understand how to use either accessRules and AuthManager or both together.

Ok Now
I have resolved the problem.

The simplest solution is

public function accessRules() {
return array(
    array('allow',
        'users' => array('@'),
    ),
    array('allow',
        'actions' => array('login, logout'),
        'users' => array('*'),
    ),
    array('deny',
        'actions' => array('*'),
        'users' => array('?'),
    ),
);

}

Rest will be handled by AuthManager