WIP: Refactor certificate agent and queue

Details to follow...
maybe the two auth types should have a little more explanation to explain that one is http basic and the other is the xqueue login mechanism?