Uncaught NotFoundError - WebLoginPanel in Template

Hello,

I try to integrate a WebLoginPanel (or other custom components) in a html template. Using the ElementID this works with simple components as described in the manual:

WebLabel1 with ElementID lb1 in my unit
<span id="lb1"></span> in the html template

but

LoginPanel1 with ElementID lb2 in my unit
<span id="lb2"></span> in the html template does not work

I get an
"Error
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node..."

What is the right way to include such comonents in the temlate? Do You have an example?

Regards
Harald