Added support for custom base_url