Fixed a bug where saving settings would reset the token and log the user out.
Added a promise to the settingsController to load only when localStorage is ready and settings has been loaded.