Added option to set username and password