public function openAccount(User $user)
    {
        $this->session->remove('usr_id');
        $this->session->remove('session_id');

        $session = new Session();
        $session->setBrowserName($this->browser->getBrowser())
            ->setBrowserVersion($this->browser->getVersion())
            ->setPlatform($this->browser->getPlatform())
            ->setUserAgent($this->browser->getUserAgent())
            ->setUser($user);

        $this->em->persist($session);
        $this->em->flush();

        $this->populateSession($session);

        foreach ($this->app->getAclForUser($user)->get_granted_sbas() as $databox) {
            \cache_databox::insertClient($this->app, $databox);
        }
        $this->reinitUser();

        return $session;
    }