making paths relative to full couchdb url

This code should request https://my.domain.com/couch/_session/,
not https://my.domain.com/_session/ :

var couch = new CouchLogin('https://my.domain.com/couch/')
couch.get('/_session', cb)