Thanks Jason.
Strangely, I'd tried that without success - but when I changed things around so that the login date was current_timestamp in the database and put your code on the logout page (in the update server behaviour) it worked. Thanks again,
Cheers
Chris