handle cookies and expires fields