You can configure Remote Desktop Services (formerly known as Terminal Services) to disconnect and/or end sessions based on timings of your choice. A Microsoft forum entry describes the various settings and options available.
Query AD to find last contact time of domain computers
Finding the last 'logon' time of a domain computer is not as straightforward as you might think, i.e. there is no...