better cookie tests and documentation