fix issue with unencoded passwords

When using a complex password that cannot be embed into a url the gem breaks. This change ensures that passwords that do not have valid url parameters work properly.