Remember Me Cookie Login

I have set configuration:

‘allowAutoLogin’=>true,

After successful login (with checked remember me checkbox) special cookie (with hash) is created. But after closing browser and opening website again I am not logged in but instead redirected to login page. When I look in application.log I have:

2014/07/30 09:44:11 [trace] [system.db.CDbCommand] Querying SQL: SELECT itemname

FROM AuthAssignment

WHERE itemname=:itemname AND userid=:userid. Bound with :itemname=‘Admin’, :userid=‘10’

But after invoking filteraccessControler userId is set to 0

2014/07/30 09:44:11 [trace] [system.web.filters.CFilterChain] Running filter AController.filterforcedPasswordChange()

2014/07/30 09:44:11 [trace] [system.web.filters.CFilterChain] Running filter AController.filteraccessControl()

2014/07/30 09:44:11 [trace] [system.db.CDbCommand] Querying SQL: SELECT *

FROM AuthAssignment

WHERE userid=:userid. Bound with :userid=0

What could be the problem ?