public static User login(String id, String pw) throws SQLException, NamingException, NoSuchAlgorithmException
	{
		User user = null;
		
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		DataSource ds = getDataSource();
	    
	    try 
	    {
			conn = ds.getConnection();
			stmt = conn.prepareStatement(
					"SELECT * FROM users " +
					"WHERE id=? AND pw=md5(?) "
					);
			stmt.setString(1,  id);
			stmt.setString(2,  pw);
			
			rs = stmt.executeQuery();
		    
			while(rs.next())
		    {                  
				user = new User(rs.getInt("u_id")
						,rs.getString("join_type")
						,rs.getString("id")
						,rs.getString("pw")
						,rs.getString("name")
						,rs.getString("email")
						,rs.getString("tel")
						,rs.getString("gender")
						,rs.getString("start")
						,rs.getString("adm"));
		    }				
	    }
	    catch (SQLException e)
		{
		} 
		finally
		{
			if (rs != null) try{rs.close();} catch(SQLException e) {}
			if (stmt != null) try{stmt.close();} catch(SQLException e) {}
			if (conn != null) try{conn.close();} catch(SQLException e) {}
		}
	    return user;
	}