refactor oauth authorization for better performance