It just came to me that you probably have to escape `user` and `password` values when assigning them to URI since it doesn't do it for you. To test, try assigning a username with an `@` character in it, such as an email address. If not properly escaped, the assignment will blow up.

I know. URI is kind of broken in this regard