Removed the dependency from PHP-OAuth2 and rewrote the code.