replace cookies by local storage