added support for reading connection information from environment variables or config file