public void login_function() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
	{
		//READ HIERARCHY FROM DATABASE AND DECIDE ON FUNCTION--||
		Class.forName("com.mysql.jdbc.Driver").newInstance();
		Statement s = GUI.con.createStatement();
		s.executeQuery ("SELECT Hierarchy, User_Name, Pass_Word, G_Name FROM all_users");
		ResultSet rs = s.getResultSet();
		boolean found = false;
		int h = 0;
		String d_u_name = "", d_p_word = "";
		String u_name = Username_Box.getText();
		String p_word = Password_Box.getText();
		String g_name = "";
		while (rs.next() && found == false)
		{
			//SET LOCAL VALUES EQUAL TO DATABASE VALUES
		       h = rs.getInt("Hierarchy");
		       d_u_name = rs.getString ("User_Name");
		       d_p_word = rs.getString ("Pass_Word");
		       g_name = rs.getString("G_Name");
		       if(d_u_name.equals(u_name))
		       {
		            found = true;
		       }			    
		}
		rs.close();
		s.close();
		//GUI.con.close();
		//-------------------------------------||
		
		if(p_word.equals(d_p_word))
		{
			//CHOOSE USER TYPE---------------------------||
			if(h == 1)
			{
				new GUI(1,g_name);
			}
			else if(h == 2)
			{
				new GUI(2,g_name);
			}
			else if(h == 3)
			{
				new GUI(3,g_name);
			}
			//END CHOOSE USER TYPE-----------------------||
		}
		else
		{
			System.out.println("Password Incorrect");
		}
	}