allows agent and password or neither agent nor password

this contribution is MIT licensed