if (context.getCurrentUser() == null) {  Authenticate .startAuthentication(context, request, response);
if (context.getCurrentUser() == null && !Authenticate .startAuthentication(context, request, response))
    private void collectionHome(Context context, HttpServletRequest request,            HttpServletResponse response, Community community,            Collection collection) throws ServletException, IOException,            SQLException, AuthorizeException    {        // Handle click on a browse or search button        if (!handleButton(request, response, collection.getHandle()))        {            // Will need to know whether to commit to DB            boolean updated = false;            // No search or browse button pressed, check for            if (request.getParameter("submit_subscribe") != null)            {                // Subscribe button pressed.                if (context.getCurrentUser() == null)                {                    // Only registered can subscribe                    Authenticate                            .startAuthentication(context, request, response);                    return;                }                else                {                    Subscribe.subscribe(context, context.getCurrentUser(),                            collection);                    updated = true;                }            }            else if (request.getParameter("submit_unsubscribe") != null)            {                Subscribe.unsubscribe(context, context.getCurrentUser(),                        collection);                updated = true;            }            // display collection home page            log.info(LogManager.getHeader(context, "view_collection",                    "collection_id=" + collection.getID()));            // Find the 5 last submitted items            BrowseScope scope = new BrowseScope(context);            scope.setScope(collection);            scope.setTotal(5);            List items = Browse.getLastSubmitted(scope);            // Get titles and URLs to item pages            String[] itemTitles = getItemTitles(items);            String[] itemLinks = getItemURLs(context, items);            // Is the user logged in/subscribed?            EPerson e = context.getCurrentUser();            boolean subscribed = false;            if (e != null)            {                subscribed = Subscribe.isSubscribed(context, e, collection);                // is the user a COLLECTION_EDITOR?                if (collection.canEditBoolean())                {                    // set a variable to create an edit button                    request.setAttribute("editor_button", new Boolean(true));                }                // can they admin this collection?                if (AuthorizeManager.authorizeActionBoolean(context,                        collection, Constants.COLLECTION_ADMIN))                {                    request.setAttribute("admin_button", new Boolean(true));                    // give them a button to manage submitter list                    // what group is the submitter?                    Group group = collection.getSubmitters();                    if (group != null)                    {                        request.setAttribute("submitters", group);                    }                }                // can they submit to this collection?                if (AuthorizeManager.authorizeActionBoolean(context,                        collection, Constants.ADD))                {                    request                            .setAttribute("can_submit_button",                                    new Boolean(true));                }                else                {                    request.setAttribute("can_submit_button",                            new Boolean(false));                }            }            // Forward to collection home page            request.setAttribute("last.submitted.titles", itemTitles);            request.setAttribute("last.submitted.urls", itemLinks);            request.setAttribute("collection", collection);            request.setAttribute("community", community);            request.setAttribute("logged.in", new Boolean(e != null));            request.setAttribute("subscribed", new Boolean(subscribed));            JSPManager.showJSP(request, response, "/collection-home.jsp");            if (updated)            {                context.complete();            }        }    }