Split plain_mechanism into client and server part