diff --git a/doc/logged.md b/doc/logged.md
index 43c81a50..9d64827e 100644
--- a/doc/logged.md
+++ b/doc/logged.md
@@ -8,7 +8,7 @@ You have three alternatives to create an already logged in client:
 
 1. Use the `liip_functional_test.authentication` key in the `config_test.yml` file;
 2. Pass an array with login parameters directly when you call the method;
-3. Use the method `WebTestCase::loginAs()`;
+3. Use the method `WebTestCase::loginClient()`;
 
 ### Logging in a user from the `config_test.yml` file
 
@@ -37,22 +37,22 @@ $credentials = array(
 $client = $this->makeClient($credentials);
 ```
 
-### Logging in a user using `WebTestCase::loginAs()`
+### Logging in a user using `WebTestCase::loginClient()`
 
-To use the method `WebTestCase::loginAs()` you have to [return the repository containing all references set in the
+To use the method `WebTestCase::loginClient()` you have to [return the repository containing all references set in the
 fixtures](#referencing-fixtures-in-tests) using the method `getReferenceRepository()` and pass the reference of the `User`
-object to the method `WebTestCase::loginAs()`.
+object to the method `WebTestCase::loginClient()`.
 
 ```php
+$client = $this->makeClient();
 $fixtures = $this->loadFixtures(array(
     'AppBundle\DataFixtures\ORM\LoadUserData'
 ))->getReferenceRepository();
 
-$this->loginAs($fixtures->getReference('account-alpha'), 'main');
-$client = $this->makeClient();
+$this->loginClient($client, $fixtures->getReference('account-alpha'), 'main');
 ```
 
-Remember that `WebTestCase::loginAs()` accepts objects that implement the interface `Symfony\Component\Security\Core\User\UserInterface`. 
+Remember that `WebTestCase::loginClient()` accepts objects that implement the interface `Symfony\Component\Security\Core\User\UserInterface`. 
 
 **If you get the error message *"Missing session.storage.options#name"***, you have to simply add to your
 [`config_test.yml`](https://github.com/liip/LiipFunctionalTestBundle/blob/master/Tests/App/config.yml#L16)
diff --git a/src/Test/WebTestCase.php b/src/Test/WebTestCase.php
index e7b60814..745bcb4f 100644
--- a/src/Test/WebTestCase.php
+++ b/src/Test/WebTestCase.php
@@ -399,11 +399,37 @@ public function fetchCrawler(string $path, string $method = 'GET', bool $authent
      */
     public function loginAs(UserInterface $user, string $firewallName): self
     {
+        @trigger_error(sprintf('"%s()" is deprecated, use loginClient() after creating a client.', __METHOD__), E_USER_DEPRECATED);
+
         $this->firewallLogins[$firewallName] = $user;
 
         return $this;
     }
 
+    public function loginClient(KernelBrowser $client, UserInterface $user, string $firewallName): void
+    {
+        // has to be set otherwise "hasPreviousSession" in Request returns false.
+        $options = $client->getContainer()->getParameter('session.storage.options');
+
+        if (!$options || !isset($options['name'])) {
+            throw new \InvalidArgumentException('Missing session.storage.options#name');
+        }
+
+        $session = $client->getContainer()->get('session');
+        $session->setId(uniqid());
+
+        $client->getCookieJar()->set(new Cookie($options['name'], $session->getId()));
+
+        $token = $this->createUserToken($user, $firewallName);
+
+        $tokenStorage = $client->getContainer()->get('security.token_storage');
+
+        $tokenStorage->setToken($token);
+        $session->set('_security_'.$firewallName, serialize($token));
+
+        $session->save();
+    }
+
     /**
      * Asserts that the HTTP response code of the last request performed by
      * $client matches the expected code. If not, raises an error with more
diff --git a/tests/Test/WebTestCaseConfigTest.php b/tests/Test/WebTestCaseConfigTest.php
index 08cc6c0d..f48471a6 100644
--- a/tests/Test/WebTestCaseConfigTest.php
+++ b/tests/Test/WebTestCaseConfigTest.php
@@ -59,8 +59,10 @@ public function testIndexClientWithCredentials(): void
 
         $this->assertStatusCode(200, $this->client);
 
-        $this->assertSame(1,
-            $crawler->filter('html > body')->count());
+        $this->assertSame(
+            1,
+            $crawler->filter('html > body')->count()
+        );
 
         $this->assertSame(
             'Logged in as foobar.',
@@ -88,8 +90,10 @@ public function testIndexAuthenticatedClient(): void
 
         $this->assertStatusCode(200, $this->client);
 
-        $this->assertSame(1,
-            $crawler->filter('html > body')->count());
+        $this->assertSame(
+            1,
+            $crawler->filter('html > body')->count()
+        );
 
         $this->assertSame(
             'Logged in as foobar.',
@@ -125,8 +129,44 @@ public function testIndexAuthenticationLoginAs(): void
 
         $this->assertStatusCode(200, $this->client);
 
-        $this->assertSame(1,
-            $crawler->filter('html > body')->count());
+        $this->assertSame(
+            1,
+            $crawler->filter('html > body')->count()
+        );
+
+        $this->assertSame(
+            'Logged in as foo bar.',
+            $crawler->filter('p#user')->text()
+        );
+
+        $this->assertSame(
+            'LiipFunctionalTestBundle',
+            $crawler->filter('h1')->text()
+        );
+    }
+
+    /**
+     * Log in as the user defined in the Data Fixture.
+     */
+    public function testIndexAuthenticationLoginClient(): void
+    {
+        $this->client = static::makeClient();
+
+        $this->schemaUpdate();
+        $user = $this->loadTestFixtures();
+
+        $this->loginClient($this->client, $user, 'secured_area');
+
+        $path = '/';
+
+        $crawler = $this->client->request('GET', $path);
+
+        $this->assertStatusCode(200, $this->client);
+
+        $this->assertSame(
+            1,
+            $crawler->filter('html > body')->count()
+        );
 
         $this->assertSame(
             'Logged in as foo bar.',