    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	String action = request.getParameter("Action");
    	String name = request.getParameter("User");
    	String pass = request.getParameter("Pass");
    	System.out.println(action);
    	ServletContext sc = request.getServletContext();
		AccountManager am = (AccountManager) sc.getAttribute("accounts");
    	if (action.equals("Create")) {
    		Account acct = am.createAccount(name, pass);
    		if (acct == null) {
    			request.getRequestDispatcher("/NameTaken.jsp").forward(request, response);
    		} else {
    			sc.setAttribute("user", name);
    			Account curracct = (Account) request.getSession().getAttribute("account");
    			curracct = acct;
    			request.getRequestDispatcher("/UserHome.jsp").forward(request, response);
    		}
    	} else if (action.equals("Delete")) {
    		am.deleteAccount(name);
    		request.getRequestDispatcher("/GuestHome.jsp").forward(request, response);
    	}  else if (action.equals("Logout")) {
    		am.logoutAccount((Account) request.getSession().getAttribute("account"));
    		request.getSession().setAttribute("account", null);
    		request.getRequestDispatcher("/GuestHome.jsp").forward(request, response);
    	}
    }

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	String action = request.getParameter("Action");
    	String name = request.getParameter("User");
    	String pass = request.getParameter("Pass");
    	System.out.println(action);
    	ServletContext sc = request.getServletContext();
		AccountManager am = (AccountManager) sc.getAttribute("accounts");
    	if (action.equals("Create")) {
    		Account acct = am.createAccount(name, pass);
    		if (acct == null) {
    			request.getSession().setAttribute("user", name);
    			request.getRequestDispatcher("/NameTaken.jsp").forward(request, response);
    		} else {
    			request.getSession().setAttribute("user", name);
    			request.getSession().setAttribute("account", acct);
    			request.getRequestDispatcher("/UserHome.jsp").forward(request, response);
    		}
    	} else if (action.equals("Delete")) {
    		am.deleteAccount(name);
    		request.getRequestDispatcher("/GuestHome.jsp").forward(request, response);
    	}  else if (action.equals("Logout")) {
    		am.logoutAccount((Account) request.getSession().getAttribute("account"));
    		request.getSession().setAttribute("account", null);
    		request.getRequestDispatcher("/GuestHome.jsp").forward(request, response);
    	}
    }
