Moved OAuth code to its own class library