fixed minor issues of cookie handling
added solution for bonus assignment, verified results