Store persistent data in the browser asynchrnously with promises