Yeah, wasn't 100% sure on that, been ages since I had to do anything similar. However, it should be easy enough to set the shell to a batch file that does the necessary. Something like:
start /wait <path to media center executable>
shutdown /l
That way when media center exits, the batch file will kick back in and log you off.