With DSAPI how to determine user is logged in or not?

Hi Expert:

    I am using DSAPI to implement SSO , is there any event or API I can use to determine if user is logged in or not?



    For example , I can let user log in , but after a period of time the user session will be expired , domino web server just show user a log in form again, with same URL which user is visiting.  I need to capture this status in DSAPI, then to do something to re-authenticate user again.



    Any ideas ? Thanks a lot !