WASHINGTON, Aug 21 (Reuters) - A U.S. judge on Thursday sided with two New Jersey criminal defendants who sought to block a former personal lawyer to President Donald Trump, Alina Habba, from prosecuting them based on a claim she was unlawfully appointed as the state's top federal prosecutor.