Refactored Oauth related code into seperate module