Persist preferences using localforage