Add support for cookie token checking

A cookie name can be provided during configuration of the service. If this cookie does not exist or returns a falsy value when the isAuthenticated method is called, then the stored profile will be cleared and a logout event raised. This will resolve an issue with the user navigating to a secure page and leaving it open until the cookie expires, then trying to use the site again. I also added a complete suite of tests that should provide excellent code and arc coverage.