Anti,
Where did that code come from? That's not the vB4 code.
What you'll need to do is go back to the pages I linked to in the other thread...
You need to cut the login code from the header, paste that into the desired location in the navbar template. Now using the info on how to register variables you need to register those variables within that code you cut, once that's done it will work

.
I know some of it's confusing but you need to mess with it and tinker around, do this in a Child Style of your current one that way you don't mess up your "live" style.
Remember we are here to teach, we can't always simply do the work for you and paste it... we could but then we'd only be able to help a few versus many each day and as you can imagine it's also quite time consuming with some things versus others as well. If you put a little more effort into it I'm sure you'll reply back like many others have in the past, that you figured it out!