Major refactor: updated OAuth2 library, better use of webmachine's resource functions, tests now send HTTP requests.