implement C/S authorization and message encryption