fix for metadata URL retrieve for OAuth