Log IN and Logout Event for a User ?

Hi Experts,

I having the following requirement and would like to take any of your expertise suggestions to implement the solution. The requirement goes like this :

We have a async Table where we list all the Projects for a user and each Project can have multiple Tasks ( displayed in a seperate column as a list of line items) which are assigned to this logged in user for the Application. So we always show the Active Tasks in this page ( to indicate this visually we have a play button icon to indicate they are active ones) . Say for instance the logged in user decides to act upon the Active Task for a Project and on click of Task, a modal dialog box opens and user does necessary things before closing this modal dialog( close this Task) . Once after completion we are supposed to show the Completed Tasks as well ( icon now changed to something else from previous play button icon ) in this Table until user logs in for next time . So in simple words if user in same session then he should be displayed with both Active as well as Completed and incase user logs out , logs in to application again , then user should see only Active Tasks and not previously completed tasks.

Thank you,

Regards,
Nis

Maybe you can simplify the solution and construct some query that matches all of the items that have Active status or Completed status where the lastModified timestamp of the task is greater than your login timestamp?