added basic cookie functionality