protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		
		HttpSession session = request.getSession();
		Connection con = null;
		try{
		
	    Class.forName("com.mysql.jdbc.Driver").newInstance();
	    con = DriverManager.getConnection("jdbc:mysql://localhost:3306/kfaultdb","root","Cl1m8t3;");
	    
	    ResultSet rsdoLogin = null;
	    PreparedStatement psdoLogin = null;
	    
	    String email= request.getParameter("Eusername");
	    String pass= request.getParameter("Epasswrd");
	    String message = "success";
	    
	    
	    	String sqlOption= "SELECT * FROM author where email=? and pass=?";
	    	
	    	psdoLogin = con.prepareStatement(sqlOption);
	    	psdoLogin.setString(1, email);
	    	psdoLogin.setString(2, pass);
	    	
	    	rsdoLogin=psdoLogin.executeQuery();
	    	
	    	
	    	if(rsdoLogin.next())
	    	{
	    	  String EuserName=rsdoLogin.getString("email")+ ""+rsdoLogin.getString("pass");
	    	  
	    	  
	    	  session.setAttribute("email", email);
	    	  String priv = rsdoLogin.getString("privilege");
	    	  
	    	  if(priv.equals("Admin"))
	    	  {
	    		  System.out.println("You have logged in with admin privileges");
	    		  session.setAttribute("privilege", priv);
	    		  response.sendRedirect("AdminHome.jsp");
	    	  }
	    	  
	    	  if(priv.equals("Developer"))
	    	  {
	    		System.out.println("Developer privileges");
	    		session.setAttribute("privilege", priv);
	    		response.sendRedirect("DeveloperHome.jsp");
	    	  }
	    	  
	    	  
	    	}
	    	  else
	    	  {
	    		  message = "No user";
	    		  response.sendRedirect("Index.jsp?error="+message);
	    	  }
	    	  
	    	}
	    	catch(Exception e)
	    	{
	    		e.printStackTrace();
	    	}
	    	
	    	try{
	    		
	    		if(con!=null)
	    		{
	    			con.close();
	    		}
	    	}
	    	catch(Exception e)
	    	{
	    		e.printStackTrace();
	    	}
		
	}