added persistent storage of cookies