updated cookies and cleanup