Even before we start talking JSF, there are a couple of things.
1. User-designed login systems are one of the biggest causes of exploitable webapps there are. I always recommend using a security system that was designed and tested by professional security experts over the DIY approach.
J2EE has a login system built right into the specification and it's quite adequate for the overwhelming majority of all J2EE webapps. I realize that almost every J2EE book ever published has a sample "login form" processor, but in the real world, that's just painting a target on your back.
2. Web applications are not processes. They do not execute except when a request comes in, needs processing, and a response is sent. They do not run as tasks or threads, but instead are called on-demand under a
thread that is assigned by the webapp server when the request comes in. That thread is then returned to a general pool when the response has been sent back. So JSF bean or not, there's no way to set up a timer in J2EE-compliant code.
3. The J2EE HttpSession object has a finite lifespan, which can be specified in the WEB-INF/web.xml file. The lifespan is the maximum amount of time allowable between incoming Http requests from the user associated with that session. Thus, every time a request comes in, a countdown begins for the session. If that countdown goes to zero, the session is destroyed by the webapp server (NOT the web application). The actual time of destruction is not predictable except that it is guaranteed not to be destroyed until the session timeout has expired. The actual destruction will be handled by the webapp server when it is convenient, although the session itself will be unavailable to any requests coming in in the mean time - a new session would have to be constructed if those requests needed a session.
Now for the JSF-specific stuff:
A JSF managed bean is intended to be a POJO. Attempting to store HttpRequest, HttpResponse, FacesContext or other request-related objects in static code will fail, since any such object would be meaningful only as long as the request that constructed the bean is being processed. The same is also true for member methods and constructors - none of these objects can safely carry over between requests.