Make the login page/action check if the user is logged in, and redirect to the home page if logged in:
if (alreadyLoggedIn) {
response.sendRedirect(response.encodeRedirectURL(request.getContextPath() + "/home"));
return;
}
But you should probably not have a link to the login page in the first place if the user is already logged in.