I do not see much sense in having two login forms on one page, but if your client insists ;-).
Assuming that each form should direct to another page, after successfull logged in, you could write your own Controller that handles the request. This Controller do the authentication for you and forward to a page you want.
Something like this:
You should pack it all in a try- catch Block and handle Exception that could occur when the login fails.
//Here you could get the values from the first or second form
//Or checking a hidden input to deside which form was send.
UsernamePasswordAuthenticationToken authReq= new
UsernamePasswordAuthenticationToken(<given username>,<given password>);
HttpServletRequest request= <method to get the request>;
HttpSession session= request.getSession();
Authentication auth= getAuthenticationManager.authenticate(authReq);
SecurityContext secCtx= SecurityContextHolder.getContext();
List grantedAuth= Arrays.asList(auth.getAuthorities);
<Now forward based on the authorities>
I use this controller in JSF. Their I have to do the authentication completly by myself. With this code snip you should have enough freedom to design your page as you want and only use values from it you need.