Added ability to specify username and password