adding support for authentication and selecting a specific database at connection