title: Spring security access denied message when accessing login page after login successfully.It should redirect to default page
body: <ol>
  <li>Configured spring security successfully<br/></li>
  <li>Authentication properly working<br/></li>
  <li>Problem is that after login successfully if user access login page, access denied message appears.It must redirect to default page as user already login.<br/>
  When i access login.html after login successfully , access denied message appears.
  Here's my code </li>
  </ol>
  
  <hr>
  
  <pre><code>&lt;http auto-config="true"&gt;
      &lt;intercept-url pattern="/login.html" access="ROLE_ANONYMOUS" /&gt;
      &lt;intercept-url pattern="/services/**" filters="none"/&gt;
      &lt;intercept-url pattern="/**" access="ROLE_ADMIN" /&gt;
      &lt;form-login login-page="/login.html" default-target-url="/stations.html" always-use-default-target="true" /&gt;
      &lt;logout logout-url="/logout" logout-success-url="/login.html"/&gt;
      &lt;intercept-url pattern="/css/**" filters="none"/&gt;
      &lt;intercept-url pattern="/js/**" filters="none"/&gt;
      &lt;intercept-url pattern="/images/**" filters="none"/&gt;
      &lt;intercept-url pattern="/common/**" filters="none"/&gt;
      &lt;/http&gt;
      &lt;authentication-manager&gt;
      &lt;authentication-provider&gt;
          &lt;jdbc-user-service data-source-ref="dataSource"
         users-by-username-query="
            SELECT USERNAME,PASSWORD,USER_STATUS as ENABLED 
            from USERS where USERNAME=?" 
  
         authorities-by-username-query="
            SELECT USERNAME, USER_ROLE from USERS 
            where USERNAME =?  " 
  
      /&gt; 
    &lt;/authentication-provider&gt;
  &lt;/authentication-manager&gt; 
  </code></pre>