Added spring security logic