move cookie.js to header