Changed the cookie system to a local storage system.