Added oauth2 dependency
added an example sinatra app for the oauth stuff
refactored to reduce redundant code