I need some help with the basic understanding of how to save data in local storage.

I have a Model called Settings and a Store called SettingsStore which uses the Settings Model. SettingsStore has an onStoreLoad event that automatically creates one record if it does not exist.

Code:
var settings = this.getAt(0);
if (!settings) {
    console.log('SettingsStore creating record');
    this.add({accountId: null});
}
Then, in the launch even of my main controller I check to see if the accountId exists.

Code:
var settingsStore = Ext.StoreMgr.get('SettingsStore');
var settings = settingsStore.getAt(0);
if (!settings.data.accountId) {
    console.info("No accountId");
    //go to registration view
}
else {
    console.info("accountId: " + settings.data.accountId);
}
In the registration view I save the new accountId.

Code:
        var settingsStore = Ext.StoreMgr.get('SettingsStore');
        var settings = settingsStore.getAt(0);
        settings.data.accountId = responseData.accountId;
        settings.commit();
        settingsStore.sync();
However, when I re-launch the app in the launch even of my main controller the value for settings.data.accountId is still null.