Fix for available/supported grant types. Add validations and tests for them
merged with master and fixed conflicts
some cleanup