package com.google.sps.servlets;

import java.net.*; 
import com.google.cloud.language.v1.Document;
import java.io.PrintWriter;
import com.google.appengine.api.datastore.*;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.cloud.language.v1.LanguageServiceClient;
import com.google.cloud.language.v1.Sentiment;
import java.io.IOException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.firebase.auth.FirebaseToken;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseAuthException;
import com.google.firebase.auth.SessionCookieOptions;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import com.google.sps.firebase.FirebaseAppManager;



@@ -31,362 +31,8 @@
 s;%0A%0A
-import java.net.*; %0Aimport com.google.cloud.language.v1.Document;%0Aimport java.io.PrintWriter;%0Aimport com.google.appengine.api.datastore.*;%0Aimport com.google.appengine.api.users.UserService;%0Aimport com.google.appengine.api.users.UserServiceFactory;%0Aimport com.google.cloud.language.v1.LanguageServiceClient;%0Aimport com.google.cloud.language.v1.Sentiment;%0A
 impo
@@ -91,32 +91,66 @@
 ion.WebServlet;%0A
+import javax.servlet.http.Cookie;%0A
 import javax.ser
@@ -269,414 +269,453 @@
 se;%0A
-import com.google.firebase.auth.FirebaseToken;%0Aimport com.google.firebase.auth.FirebaseAuth;%0Aimport com.google.firebase.auth.FirebaseAuthException;%0Aimport com.google.firebase.auth.SessionCookieOptions;%0Aimport java.util.concurrent.TimeUnit;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.Cookie;%0Aimport com.google.sps.firebase.FirebaseAppManager;%0A%0A
+%0A@WebServlet(%22/sign-out%22)%0Apublic class Logout extends HttpServlet %7B%0A  @Override%0A  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException %7B%0A    final int maxAge = 0;%0A    Cookie newCookie = new Cookie(%22session%22, %22 %22);%0A    newCookie.setMaxAge(maxAge); // Set the expiration date to immediate deletion%0A    response.addCookie(newCookie);%0A    response.sendRedirect(%22/index.html%22); // Go back to the main page%0A  %7D%0A%7D
 %0A

Make current cookie expire for logging out.