Don't store the auth cookie explicitly, do everything via the prefs module.
Switch to using HTML5 local storage when available.
Merge bug25984