Cc 883

OK, this should hopefully be all. Has support for username and password fields as well as the %-encoding fixes. And support for %-encoding the username and password if they need it.