Federal judge: Terror law violates 1st Amendment