rest: add basic remote auth support