added constructor to include username and password.