various additions to allow oauth api access
merged previous changes