Fix cookie <-> auth status synchronization issue