I'm using user_signed_in? to check if the user is logged in to display the logout link if not logged in it will display the login link, but for some reason it's only show the login link either if the user is signed in or not. And when i click on the login link it will say the user signed in already. in this case it should display the log out link but it does not.
<%if user_signed_in?%>
<%= link_to "Logout", destroy_user_session_path, method: :delete%>
<%else%>
<%= link_to "Login", new_user_session_path %>
<%end%>