Update oauth2.php

Updated with connect function
Merge pull request #1 from AnthonyVanRoy/patch-1

Update oauth2.php