Generalization of base url
Removed clunky methods, implemented oauth setup