Added example for SpringSecurity integration.

Fixed some Java 6 incompatibilities.
Added mention for the security module in readme.

Original pull request: #1.