<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<%
	try
	{
		String req;
		if (request.getParameter("req") != null)
		{
			req = request.getParameter("req");
		}
		else
		{
			req = "LoginForm";
		}
		
		if (req.equals("Table"))
		{
			response.sendRedirect("Helpers/PresidentsTable.jsp");
		}
		else if (req.equals("Login"))
		{
			String un = request.getParameter("username");
			String pw = request.getParameter("password");
			response.sendRedirect("Helpers/Login.jsp?username=" + un + "&password=" + pw);
		}
		else if (req.equals("LoggedIn"))
		{
			response.sendRedirect("Helpers/LoggedIn.jsp");
		}
		else if (req.equals("Logout"))
		{
			response.sendRedirect("Helpers/Logout.jsp");
		}
		else //LoginForm
		{
			response.sendRedirect("Helpers/LoginForm.jsp");
		}
	}
	catch (Exception e)
	{
		out.write(e.toString());
	}
%>