protected void handleRedirectBack(final HttpServerExchange exchange) {
final Map<String, Cookie> cookies = exchange.getRequestCookies();
if (cookies != null && cookies.containsKey(LOCATION_COOKIE)) {
final String location = cookies.get(LOCATION_COOKIE).getValue();
exchange.addDefaultResponseListener(new DefaultResponseListener() {
@Override
public boolean handleDefaultResponse(final HttpServerExchange exchange) {
FormAuthenticationMechanism.sendRedirect(exchange, location);
exchange.setResponseCode(FOUND);
exchange.endExchange();