How are you logging in initially? i.e. what are you authenticating against? If you are talking about an initial authentication then you won't be able to obtain the user name from getRemoteUser() - it will return null.
Do you require an additional authentication to another system?
If you are only talking about an initial login to JBoss/Tomcat, using LDAP for authentication then there is an LDAP authentication module supplied (org.jboss.security.auth.spi.LdapLoginModule). I haven't used it myself so can't comment beyond that.