EU taking legal action over Brexit deal