added support for username and password