Added support for custom base url