Preserve cid when not logged in and apply later

Follow-up fix for https://github.com/Rise-Vision/common-
header/issues/277
Merge pull request #286 from settinghead/master

Preserve cid when not logged in and apply later