added shutdown, restart, logoff, hibernation code.