Remove duplicated Cookie management code to keep codebase DRY.
Merge branch 'cookie' into development