working version with oauth authentification