PrintWriter writer = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "utf-8"));
JsonObject jsonResponse = new JsonJavaObject();
if(getAuthAction(pathInfo).equals(LOG_OUT)){
boolean logoutSuccessful = true;
try {
endpoint.logout();
} catch (AuthenticationException e) {
logoutSuccessful = false;
}
try {
if(endpoint.isAuthenticated()){