APPS-426 - added an optional debug parameter to the client init method.

Also don't try to parse results of an SSO api call as JSON.