title: Spring security login/logout url related issue
body: <p>I am using spring security for my application. Following are some lines from my applicationContext-Security.xml to set access as ROLE_USER for /offers and /add links and no filters for /list link.</p>
  
  <pre><code>&lt;intercept-url pattern="/list*" filters="none" /&gt;
  &lt;intercept-url pattern="/offers**" access="ROLE_USER" /&gt;
  &lt;intercept-url pattern="/add/**" access="ROLE_USER" /&gt;
  </code></pre>
  
  <p>I want to show <strong>LOGIN</strong> link when user is not logged in and when user logs in to system then this link should be replaced by <strong>LOGOUT</strong>.
  For that I tried following code in my jsp page.</p>
  
  <pre><code>&lt;security:authorize ifNotGranted="ROLE_USER"&gt;  
    &lt;a href="login.jsp"&gt;Login&lt;/a&gt;
  &lt;/security:authorize&gt;
  
  &lt;security:authorize ifAnyGranted="ROLE_USER"&gt;
    Welcome &lt;security:authentication property="principal.username"/&gt;! &amp;nbsp; 
  | &lt;a href="logout.htm"&gt;Logout&lt;/a&gt;     
  &lt;/security:authorize&gt;
  </code></pre>
  
  <p>When I am on /list link, It shows "LOGIN" link.
  After login if user redirected to /offers or /add link then it shows "Welcome UserName | LOGOUT" which is working as per requrment. But Problem is, when user logs in and redirected to /list page then also it shows "LOGIN"<em>(USER is already logged in)</em> It should show  "Welcome UserName | LOGOUT"</p>
  
  <p>Help me in this scenario, What should I do to get it working?
  Thank you in advance.</p>