Javascript and php ActiveRecord with Oauth2 to google implementation