Add a way to connect using a URI

Fixes #70.