save settings in localstorage