Actually, this might work better:
<% If DotNetNuke.Security.PortalSecurity.IsInRole("Registered Users") %>
<li><dnn:USER runat="server" id="dnnUSER" /></li>
<% Else %>
<li><dnn:LOGIN runat="server" id="dnnLOGIN" /></li>
<% End If %>
<% If DotNetNuke.Security.PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) %>
<li><dnn:LOGIN runat="server" id="dnnLOGINAdmin" /></li>
<% End If %>
Perhaps one of the code smiths in the DNN community could clean that up more.
If you don't need the control over the layout then you can use this method from DNNcreative.