store the key in localstorage