Updated to support OAuth.