Look into invoking ExitWindowEx. Suggest having a service running on the machine (will need to run with escalated privileges), listening on some port. You'll need to open firewalls too.
Here is some infhttp://www.pinvoke.net/default.aspx/user32.exitwindowsex
Alternatively you can call another process which would be shutdown.exe - goto a command line and type "shutdown /?" for more info.
Note you cannot use shutdown over the network to log someone off, it would have to be invoked via your service on the local machine. You could however cause a reboot of the machine remotely via shutdown. type shutdown /i for a gui.
If it's a shared machine (vm perhaps(?)) You'll find taskmanager can quite adequately do the job. Just look under the "users" tab.
"Also is there anyway to insert a line of code into an existing exe to launch another exe?"
Why would you want to do this...?
Very simple if you have the source code and can recompile the exe.
If you're after modifying the pre-built binary... well it is possible, though I can't see why you would want to do this except for something that is malicious? Certainly not an easy thing to do. Learning ASM would get you started thou. Reluctant to give more info about this.
A simpler way that would give you the same result, but be less "stealthy" and therefore not suitable for anything malicious would be to write a third binary (or script), that executes the first 2 binaries in the required order.
If you provide some more context to your particular problem, could perhaps advise better.