Implement Session In Yii And Extjs

i am implementing login and logout functionality in Yii and Ext JS. so far i guess i have done that. but i want to maintain a session too so that when a user refresh the ExtJS page i want to stay on a current page if a user is still logged in and if the time passed user will logged out again.

[b][i]note: i am using ajax request for login and logout

[/i][/b]

i tried reading articles but didnt figure out how to do it

http://www.yiiframework.com/forum/index.php?/topic/12124-how-to-implement-session-timeout/

i am new to yii so can anyone suggest me a roadway how to implement this functionality.

so far i have enable it in a config.php file


'session' => array (

    'class' => 'system.web.CDbHttpSession',

    'connectionID' => 'db',

    'sessionTableName' => 'sessions',

    'timeout'=>'20' // twenty seconds

),