@@ -0,0 +1,928 @@
+package com.google.sps.servlets;%0A%0Aimport com.google.appengine.api.users.UserService;%0Aimport com.google.appengine.api.users.UserServiceFactory;%0Aimport com.google.gson.Gson;%0Aimport java.io.IOException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A@WebServlet(%22/login_status%22)%0Apublic class LoginStatusServlet extends HttpServlet %7B%0A%0A  @Override%0A  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException %7B%0A    response.setContentType(%22text/html%22);%0A%0A    boolean isLoggedIn = false;%0A    UserService userService = UserServiceFactory.getUserService();%0A    if (userService.isUserLoggedIn()) %7B%0A      isLoggedIn = true;%0A    %7D%0A%0A    Gson gson = new Gson();%0A    response.setContentType(%22application/json;%22);%0A    response.getWriter().println(gson.toJson(isLoggedIn));%0A  %7D%0A%7D

Check status of login.