I had this problem... here's how i fixed it.

I replaced the relay provided with a 40A automotive relay, and i replaced all heat bed wiring with 10AWG high temp silicone wiring. While I was at it, I moved the heated bed to its own 30A power supply and now run the hotend and electronics off of an old PSU. The wiring now gets warm but never hot.

The reason that the wiring is beginning to melt is that it can't handle the load the heated bed pulls, and as a result generates heat. To be safe you should probably use a minimum of 12AWG wire, I just went with 10AWG to go for overkill... :-)

Good luck
hope this helped