Added username and password as parameters.