On the Steam and retail versions of Star Wars: Empire at War and Forces of Corruption, the game servers hosted by Gamespy have severe connectivity issues, rendering EaW and FoC almost unplayable online.
There are three patches that can solve the problem. Try each patch one-by-one until the issue is fixed and you are able to log on to Empire at War and Forces of Corruption. Each patch fixes both game connectivity issues, you just need to see which one is right for you.
To be sure the patch installs correctly, run it with "administrator" permissions on your computer.