Added a feature to connect to database with username and password