what you do is to cut the male end off leaving enough wire to reach to the rear of the bike.... Both cut ends of the male plug attach to the light switch... I know it sounds screwed up but trust me.
attach the female end of the extension chord to the male end.
Cut it to size to reach the battery pack. Put clamps on each wire. Now below the ends cut one of the wires only. The battery side of that cut becomes the direct battery to negative side of the motor. On the other side of the cut the current will run from the positive battery, through connection of male female plugs, then through the switch, and back to the male female coupling again, then to the positive wire of the motor. there you have it a complete easy to wire circuit.
Then you can leave the house switch attached even when you pull the motor to take it with you. This would make a great commuter bike project. You could pull your battery pack and take it inside to charge while you work.