Electrochemistry of layered metal diborides