refactor security component for symfony 2.3