Pretreatment of various substrates prior to electrocoating