if (context.getCurrentUser() == null) {  Authenticate.startAuthentication(context, hrequest, hresponse); } else
if (context.getCurrentUser() != null || Authenticate.startAuthentication(context, hrequest, hresponse))
    public void doFilter(ServletRequest request, ServletResponse response,            FilterChain chain) throws ServletException, IOException    {        Context context = null;        // We need HTTP request objects        HttpServletRequest hrequest = (HttpServletRequest) request;        HttpServletResponse hresponse = (HttpServletResponse) response;        try        {            // Obtain a context            context = UIUtil.obtainContext(hrequest);            if (context.getCurrentUser() == null)            {                // No current user, prompt authentication                Authenticate.startAuthentication(context, hrequest, hresponse);            }            else            {                // User is authenticated                if (AuthorizeManager.isAdmin(context))                {                    // User is an admin, allow request to proceed                    chain.doFilter(hrequest, hresponse);                }                else                {                    // User is not an admin                    log.info(LogManager.getHeader(context, "admin_only", ""));                    JSPManager.showAuthorizeError(hrequest, hresponse, null);                }            }        }        catch (SQLException se)        {            log.warn(LogManager.getHeader(context, "database_error", se                    .toString()), se);            JSPManager.showInternalError(hrequest, hresponse);        }        // Abort the context if it's still valid        if ((context != null) && context.isValid())        {            context.abort();        }    }