Fix couch url and implement couch auth.