Can one have Temporary Rows?
You can make a procedure/job that cleans up the tables.  It would:


Check if the user is active
If so, ignore and move on to the next user or complete
If not, truncate/delete the table (after moving the records to a historical table if you desire)


Rinse/repeat every xx minutes.

We have used some variation of this in production. I usually do the coding in a stored procedure, and the "repeat" part comes from a SQL Server Agent job, which executes the procedure on a schedule.  I try to keep it as modular as I can.