Added OAuth code and additional methods

updated for OAuth which is working in the WP plugin