Persistent storage added

I managed to store the key db encrypted in a cookie and it is working