Headlight Switch Cranks Engine??

Does it continue to run after the headlites are turned off? Sounds like a couple wires crossed somewhere. Start at the starter relay. 1 Wire (the brown one?) actuates the starter relay when it receives 12 volts from the ignition switch. Then that relay sends full battery current to the starter. Somehow the headlite switch must be sending 12 volts to that wire, when you turn them on.