how do you configure your login module? The old way with "login-config.xml" or the new way?
I managed to place a "...-jboss-beans.xml" file in META-INF of my ejb jar using the approach described here: http://server.dzone.com/articles/security-features-jboss-510
But I did not test this with a custom login module. Probably, the code must be part of the EJB jar in this case.
Hope this helps a bit