I have written a script which runs at user logon and logoff:

@echo off
color F0
net use L: \\yourservername\dir /U:username password
echo **User Logon** UserName: %USERNAME% ComputerName:%COMPUTERNAME% UserDomain:%USERDOMAIN% UserProfile:%USERPROFILE% System Time: %TIME% System Date: %DATE% Currently Attached to Server: %LOGONSERVER% >>L:\Logon.txt
net use L: /del /yes
timeout 3

It works very well and we now have a log file which logs all of our users logging onto machines and shows them logging off also with times and dates.

Primarily I hadn't made the script to map a network drive but I kept getting "Acess Denied" So it now maps to a drive creates the log and then the script disconnects the map drive and its like it never existed, but if you go to your server and look in the folder where the drive is mapped too you should see a log file.

Obviously you can customize the script to your needs.

I hope this helps you!