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).
I think add that it returns incorrectly when in the Cordova environment, if that's what happened.