auto save settings in localstorage

Reviewer: @aogilvie