Cookie listening and ui detachment