Fix/set cookie encoding