database username and password protection added to the lib