$document[0].cookie not $document.cookie

Added method for testing cookie presence and fixed code to actually check for a real thing.
Trim cookie strings before matching for token

The cookie string coming out of document has whitespace after each separator. This has the unfortunate behavior of moving the index to 1 when trying to match for the auth cookie name. Added trim to remove leading and trailing whitespace before comparing.
Merge pull request #5 from EQCO/bah

Bah