fix bugs with oauth support and tool provider creation