public void doPost (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
		String name = req.getParameter("name");
		User user;
		try {
			// First try to find if the user exists
			user = UserDAO.find(name);
			
			if (user != null) {
				 HttpSession session = req.getSession(true);	    
		         session.setAttribute("currentSessionUser",user); 
		         res.sendRedirect("/cse135");
			} else {
				String error = "The provided name " + name + " is not known.";
				req.setAttribute("error", error);
				req.getRequestDispatcher("login.jsp").forward(req, res);
			}
		} catch (SQLException e) {
			e.printStackTrace();
			// If no user found of the given name then redirect to login page with error shown
			String error = "The provided name " + name + " is not known.";
			req.setAttribute("error", error);
			req.getRequestDispatcher("login.jsp").forward(req, res);
		}
	}