<% user = (session[:user] && User.find_by(id: session[:user])) || nil %>
<% if user.present? %>
<% user = user.person %>
<%= usermenu_logged_in %>
<% else %>
<%= usermenu_notlogged_in %>
<% @plugins.dispatch(:alternative_authentication_link).collect do |content|%>
<%= instance_exec(&content) %>
<%end%>
<%= render :file => 'account/login', :locals => { :is_popin => true } %>
<% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
<%= usermenu_signup %>
<% end %>
<% end %>