title: Unable to test user authentication in symfony2
body: <p>I'm using Symfony2 with Behat, Mink and the FosUser Bundle. The problem is that the login test always fails (the login works perfectly in development).</p>
  
  <pre><code> Scenario: A user can login
      Given I am on "http://localhost:8888/myapp/web/login"
      And fill in "username" with "psitest@domain.pt"
      And fill in "password" with "pass"
      And press "login"
      Then I should see "Logout"
  </code></pre>
  
  <p>The test fails with The text "Logout" was not found anywhere in the text of the current page. 
  Any idea on what's missing or how I could debug the problem? </p>
  
  <p>I can test non-authenticated pages with Behat/Mink.</p>
  
  <p>[Update]</p>
  
  <p>The config_test is as follows (just the relevant bits):</p>
  
  <pre><code>## Security Configuration
  security:
  encoders:
      Symfony\Component\Security\Core\User\User: plaintext
  
  providers:
      main:
          users:
              psitest@thisislove.pt: { password: senha, roles: ROLE_ADMIN }
  
  firewalls:
      secured_area:
          pattern:    ^/
          http_basic: true
          logout:     true
          security: true
          anonymous: true
  </code></pre>