ticket:3 Database cleaning on logout