there seem to be a problem with using the url.parse method if the password contains special url characters. the work around is to use an option object. but i ended spending some time before figuring this out.
my password had an % in it, i am suspecting that it was the culprit.