changed oauth token handling logic