Added support for spring security