Disinfection of water by electrochemical treatment