Following what you said, I'm using this check to try to hide the registration and login when the user is logged in and instead put a drop menu, but I'm having a problem.
The registration and login are always appearing, logged in or not logged in what I am doing wrong?
<% if (this.user) { %>
<div class="btn-group">
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="/profile">Minha conta</a></li>
<li><a href="/logout">Logout</a></li>
<li><a href="/painelControle">Meus eventos</a></li>
</ul>
</div>
<% } else{ %>
<li><a href="/cadastroUsuario" class="linkscabecalho">Cadastro</a></li>
<li><a href="/login" class="linkscabecalho"> Login </a></li>
<% } %>
<li><a href="/criarEvento" class="linkscabecalho">Criar evento </a></li>