BugFix: When the JSON parsing of the auth response fails, the callback was reporting success.

The issue was that the callback was returning the 'err' from the outer
function in this case, which was `null`, rather than `error' from catch,
which contained the JSON parsing error.

In addition to fixing the bug, I used a more distinct variable name for
the JSON parsing error to avoid confusion, and clearly labeled the issue
as a JSON parsing error in the returned diagnostic.

Test coverage for the issue is included.
Merge pull request #76 from markstos/callback-with-correct-error-in-authenticate

BugFix: When the JSON parsing of the auth response fails, the callback was reporting success.