Fixed a few bugs from the refactor to support spring-security 2.0.7 and some of the differences between spring-security 2.0 and 3.x.