Hopefully you have not shorted the board out, It sounds like you got an incomplete insertion of the keyboard cable into the logic board. To help with that use a piece of electrical tape on the cable and pull it into the slot rather than trying to push it in.
To get a spontaneous reboot of your computer, disconnect the battery and mag-safe. Press and hold the power on button for ten seconds. Reconnect the battery, then the mag-safe and it should boot on its own.