Multiple login forms in spring
===

**I have two login Forms in My Online examination application(one for Administrator and second for Examtaker. Security Elements works fine for Admin but does not work for examinee. I am not able to login with Examtaker credentials.**


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:security="http://www.springframework.org/schema/security" 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:aop="http://www.springframework.org/schema/aop"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
        
        <import resource="clubexam-servlet.xml"/>
        
        
        <security:http auto-config="true" use-expressions="true" >
            
            
            <security:remember-me key="clubexamKey" token-validity-seconds="86400" user-service-ref="accountService"/>
            <security:form-login login-page="/admin/login" authentication-failure-url="/admin/login?login_error=t"
                                 login-processing-url="/admin/j_spring_security_check"
                                 default-target-url="/admin/exam/home"/>
            <security:logout logout-url="/admin/logout" logout-success-url="/admin/login?logout=success"/>                     
            <security:intercept-url pattern="/admin/login" access="isAnonymous()"/>  
            <security:intercept-url pattern="/admin/logout" access="isAuthenticated()"/>
            <security:intercept-url pattern="/admin/account/users/**" access="hasRole('Admin')"/>
            <security:intercept-url pattern="/admin/account/settings/**" access="hasAnyRole('Admin','Examuser')"/>
            <security:intercept-url pattern="/admin/exam/**/activate" access="hasRole('Admin')"/>
            <security:intercept-url pattern="/admin/exam/**" access="hasAnyRole('Admin','Examuser')"/>
            <security:intercept-url pattern="/admin/**" access="isAuthenticated()"/>
            
            
            <security:remember-me key="clubexamineeKey" token-validity-seconds="86400" user-service-ref="examineeService"/>
            <security:form-login login-page="/exampanel/examtaker/web/login" authentication-failure-url="/exampanel/examtaker/web/login?login_error=t"
                                 login-processing-url="/exampanel/examtaker/web/j_spring_security_check"
                                 default-target-url="/exampanel/examtaker/web/Main"/>
            <security:logout logout-url="/exampanel/examtaker/web/logout" logout-success-url="/exampanel/examtaker/web/login?logout=success"/>                     
            <security:intercept-url pattern="/exampanel/examtaker/web/login" access="isAnonymous()"/>  
            <security:intercept-url pattern="/exampanel/examtaker/web/logout" access="isAuthenticated()"/>
            
            
        </security:http>
        
        <security:authentication-manager>
            
            <security:authentication-provider user-service-ref="accountService" >
                <security:password-encoder hash="md5"/>
            </security:authentication-provider>  
            
            
            <security:authentication-provider user-service-ref="examineeService" >
                <security:password-encoder hash="md5"/>
            </security:authentication-provider> 
            
        </security:authentication-manager>
       
    </beans>



***Please suggest a solution..***