title: Jsf session timeout handling if user is not logged in
body: <p>I want to do the below if the session expires:
  - reset session before it ends if user is not logged so he continue normally. 
  - redirect to login page if user is logged in.</p>
  
  <p>I managed to do the second but I need to do the first. </p>
  
  <p>I am working with jsf.</p>