Sorry, problem solved. My ant script was broken and forget to add jboss-web.xml to the web archive.
could you please provide a full version of your login-config.xml, jboss-service.xml, -service.xml, web.xml, and jboss-web.xml.
I've read the documentation, but still having trouble getting the authentication to work. It gives me http-403 when login with the right user. The wrong user gets redirected to login.jsp (just as it shoud be).