FacesContext context = event.getFacesContext();
String pathInfo = context.getExternalContext().getRequestServletPath();
if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
{
SessionTracker tracker = null;
User user = null;
try
{
tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
user = tracker.getUser();
}catch(Exception e)
{
//Tracker is null
System.out.println("Context is not active");