Fix a baseModel class error that attempts to connect to a database even if no login information has been provided.