issue: fix function to create cookies