The role of doping in electrochemical synthesis of conductive polymers