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).
>change line 208 to a truthy check rather than angular.isDefined

That's even better, because I don't think we can rely on third-party code treating `undefined` and `null` the same way we are. However, what if the cookie value is `false` or `0` or empty string?

We can either add `&& foo !== null` or change the whole condition to `foo != null` which will work for both `undefined` and `null`, but I know how the latter is most unpreferred.