add oauth support

This code adds basic OAuth support
I agree with the features :)