authenticate, register: implement client protocols