fixed some issues with OAuth
fixed some issues with OAuth