add cookies, best way to controll cookies with js