Hi Jonas,
my suggestion is to change the logic behind your project:
Instead of using the landmark option on the login and register buttons, try using a master page. What I mean is that you could create a master page with the "Register" and "Login" buttons in it, then put them into a custom location of the pages in which you want to see them.
In this way you could define a Conditional Expression, based on the UserCtxParam, into the master page, to hide those buttons in case the UserCtxParam is not empty.
It's also possible to do what you want with the landmarks, but in this case you should modify the template according to the expected behaviour, but this is not the better way..