new version with oauth support