Adding custom exceptions
adding inner exceptions to thrown ones
Only turn off endpoint validation for known test endpoints
Manually managing token refreshes
Merge pull request #1952 from christav/exceptions-296

Rework for AD logic