moved methods to handle oauth in the root to handler