protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
	{		
		
		String email = request.getParameter("email");
		String password = request.getParameter("password");
		
		//Hash password before storing in database.  Compare hereafter with hashes only
		String hashedPass = password;
		try 
		{
			hashedPass = SecurityUtils.sha1(password);
		} 
		catch (NoSuchAlgorithmException e) 
		{
			e.printStackTrace();
		}	
		
		//Authenticate login
		boolean authenticated = loginService.authenticate(email, hashedPass);
		
			//TODO: Remove debug
			System.out.println("Authenticated:  " + (authenticated ? "true" : "false"));
		
		//If logged in correctly
		if (authenticated)
		{
			User user = loginService.getUser(email);
			
			//Set a session User object - Remember user as LOGGED IN
			request.getSession().setAttribute("user", user);
			
			//Success, go to main profile page
			response.sendRedirect("profile");
			return;
		}
		else
		{
			//if incorrect login, return to login page with message
			request.setAttribute("failureMessage", "Invalid Username or Password.");
			request.getRequestDispatcher("login.jsp").forward(request, response);
			return;
		}
		
		
				
		
	}