Save token to localStorage

Save token to localStorage as well as $cookieStore to support sites running in local filesystems with no cookie support (e.g. inside cordova apps).
Yeah I wondered about this. All examples show people just using the global `document`. There is an angular `$document` but it's actually a jqLite reference to the DOM element rather than this variable.

Perhaps I should use `$window.document` imported from angular. Let me try that a minute.