2nd commit, integrated with Spring Security 3.1.3