Implementing a "logout" sqlcounter