Many players have been experiencing problems today connecting to the Battlefield 2 account server - the system through which your username and password are verified when you logon. It appears that it is the target of a DDoS (Distributed Denial of Service) attack, where large numbers of computers are used (usually without their owners permission) to constantly request data from a server, therefore making it difficult for other users to access it.
This situation highlights one of Battlefield 2's many flaws; there is no way to cancel the logging process once you have initiated it. This is not a problem when everything is running as it should - logging in takes mere seconds - but in this case, as the server is unavailable, the client just keeps trying unsuccessfully. This results in the game becoming unresponsive, in many cases requiring a hard-reboot to restore functionality. Another Nickel And Dime Solution that EA and DICE will hopefully implement in future patches.
Ah.. that explains the difficulty logging-in last night... and probably a good portion of the lag on the 'official' (rather than publicly-run) ranked servers.
The past cannot be changed. The future is yet within your power.