SessionConfig sessionConfig = exchange
.getAttachment(SessionConfig.ATTACHMENT_KEY);
Session session = sm.getSession(exchange, sessionConfig);
if (session == null)
session = sm.createSession(exchange, sessionConfig);
session.invalidate(exchange);
exchange.setResponseCode(StatusCodes.TEMPORARY_REDIRECT);
exchange.getResponseHeaders().put(Headers.LOCATION, "/");
exchange.getResponseSender().close();
}