Set up JS to save data in local storage.