You will need a headlight relay kit or the problem will resurface.
The original switch can be repaired by soldering the wire that came off, but you will need to replace two tamper-proof screws with metric bolts when you pull the ignition switch apart.
If you look at my signature you will find instructions on how to make a very in-expensive keyless system, which has worked on my bike for a number of years and tens of thousands of miles. However, I will say that DEcosse's system has technical advantages, as it should have for the difference in cost.