make channel code compatible with the frontend and switch encryption algorithms
fix handling of modal