added support for base_url as environment variable