update cookie and move it into conf.js