Added anonymous user check to the module file and added the create/read
cookie functionality to the javascript file.