Basically by using the +playerName and +playerPassword parameters in your command line - along with any other entries you want to put in there - you will automatically be logged in as soon as you start the game, skipping the requirement to click Login on the login screen.
Id like to point out that for this to work, the playerName and playerPassword commands are case-sensitive. That is, you must enter them exactly as shown, for example +playerName, not +playername. Furthermore your username and password are case sensitive as well, and must be entered precisely as you have them shown on the login screen. This method works with all versions of BF2, including the 1.12 patch onwards.