First you'll need to enable logon/logoff auditing. Then you use the ReadEventlog() UDF to pull all logon/logoff event from the eventlogs into a database in regular intervals.
_________________________
There are two types of vessels, submarines and targets.