Lithuania gained membership in the World Trade Organization and joined the EU in May 2004 .