Refs #38: refactorization of the cookies implementation
Closes #38: implements the cookies API on webpage