fix bug where username, password wasn't used