* The LoginService creation could be extracted to a static factory method …  createLoginService(String): LoginService
* Please use a switch-statement an make the two options ("ldap" and "test") explicit. (Starting from Java 7, switch statements can be used for Strings)
* Why "ldapTest"? Maybe just "ldap", or even "jaas"?