title: Can't logout from In Memory login on Symfony 2
body: <p>I have a little problem  of logout on my admin bundle.</p>
  
  <p>When I log in to admin with the In Memory, this works but I can't logout. </p>
  
  <p>On the other side, logout for users works perfectly. Did I miss something ?</p>
  
  <p>This is my <code>security.yml</code></p>
  
  <pre><code>security:
  encoders:
      Esimed\FrontBundle\Entity\Company: 
          algorithm: sha1
          encode_as_base64: false
          iterations: 1
      Symfony\Component\Security\Core\User\User: plaintext
  
  role_hierarchy:
      ROLE_ADMIN:       ROLE_USER
      ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  
  providers:
      companies:
          entity: { class: Esimed\FrontBundle\Entity\Company, property: email }
      in_memory:
          memory:
              users:
                  admin: { password: adminpass, roles: 'ROLE_ADMIN' }
  
  firewalls:
      dev:
          pattern: ^/(_(profiler|wdt)|css|images|js)/
          security: false
  
      admin:
          pattern: ^/admin
          http_basic:
              realm: "Administration"
              provider: in_memory
          logout:
              invalidate_session: true
              path: /admin/company/logout
              target: /
          anonymous: ~
  
      main:
          pattern: ^/
          form_login:
              check_path: esimed_front_company_login_check
              login_path: esimed_front_company_login
          logout:
              path: /company/logout
              target: /
          anonymous: ~
  
  access_control:
      - { path: ^/company/add$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/company/create$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/company/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/job/view/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/company/search, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/company/category-list, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/company/company-list, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/company, roles: ROLE_COMPANY }
      - { path: ^/job, roles: ROLE_COMPANY }
      - { path: ^/admin, roles: ROLE_ADMIN }
  </code></pre>