Updated code for the latest OAuth module