fixes #349 - adds requestHasToken method
fixes #301 - ensures newlines are replaced as expected in urlSafeB64Encode function
fixes #323 - client_id is not required to be returned when calling getAccessToken
fixes #292 - adds postgres tests and fixes postgres issues