public HttpSession invalidateSession() {
        session.invalidate();
        session = request.getSession(true);
        return session;
    }
Invalidates and recreates session (do this on login/logout).
@return the new HTTP session
xmppserver/src/main/java/org/jivesoftware/util/WebManager.java