You can use META tags in HTML to make the page refresh every x second. This is probably nice for a webcam so that users don't have to keep the image manually updated.
Seeing as the refresh will run every x second (in each client at different times), you can safely log a user out when his timestamp is older than (now - x). You can do this for every refresh of the page (some overhead involved, lots if many users), or use a cron job.