title: Spring security with multiple login pages
body: <p>I am using Spring security to secure login to the application admin section with a username and password. But now my client need to have another login screen for the application clients section, where they will have their own usernames / passwords to login to the clients section. So far I've already implemented the admin section login successfully with the following spring-security.xml settings:</p>
  
  <pre><code>&lt;security:http auto-config="true" use-expressions="true"&gt;
      &lt;security:form-login login-page="/login"
          default-target-url="/admin/dashboard" always-use-default-target="true"
          authentication-failure-url="/login/admin?error_msg=wrong username or password" /&gt;
      &lt;security:intercept-url pattern="/admin/*" access="hasRole('ROLE_ADMIN')" /&gt;        
      &lt;security:logout logout-success-url="/login"/&gt;
  &lt;/security:http&gt;
  
  &lt;security:authentication-manager&gt;
      &lt;security:authentication-provider
          user-service-ref="adminServiceImpl"&gt;
      &lt;/security:authentication-provider&gt;
  &lt;/security:authentication-manager&gt;
  </code></pre>
  
  <p>I've searched the web a lot trying to find how I can add the client section login screen, intercept-url(s), security authentication provider but couldn't find any info, so can someone please help me with any link to any tutorial / example, guide on how to do so?</p>
  
  <p>Thanks</p>