Store data on browser local storage with JavaScript