OAuth implementation with resource-directory collection

Converted basic authentication to Open Authentication, allowing request
header to be properly stored. Also added userSession to allow for
dynamic rest endpoint href.