Yves Larose.
Yes Yves, I recently had heaps of problems similar to yours and especially after I installed the Steam version of GTL. In the end I removed all traces of the Steam version, re-installed my digital download version (originally from RaceRoom), used an old DVD On-Line code I had, and this solved those parts of the problem.
Here is all I can offer you regarding my experiences with the Steam version:
Usually when the on-line code gets reported as "invalid", it means that the key code isn't present in your registry.
Check to see if you have the needed entry in your registry.
It should be located under HKey_Local_Machine\Software\Wow6432Node\10tacle Studios\GTL\Keys
On the right hand side it should show your Serial Number.
Whenever I got the invalid code message when trying to go on-line, I checked the Registry and the code would be missing.
I had to use the normal method for setting up on-line (as listed by Rupe elsewhere here), but when I got to the mesasge "invalid code", if you go back one step, it will then ask you for your code. Enter it and it should accept it and you can then proceed to the Lobby.
Exit out at this point, close GTL, and re-boot the PC. Check that it has saved the code now in the Registry.
In my case, it kept removing the code from the registry after a re-boot, and I couldn't solve it, except for re-entering the code all the time. Hence why I gave up and used a different code.
However, maybe a basic check first, are you entering the code without using the "-" 's. This is now required to get the code in correctly.
Hope this is some help for now. I share your frustration. The Steam version can be very buggy on-line.