public function login()
    {
        $this->dataCollection->add('meta', Config::getInstance()->get('Eureka\Global\Meta'));

        $hasError = false;

        $server  = Http\Server::getInstance();
        $session = Http\Session::getInstance();
        $email   = '';

        if ($server->isPost()) {

            try {

                $userMapper = new UserMapper(Database::get('user'));

                $post = Http\Post::getInstance();
                $user = $userMapper->findByEmail($email = $post->get('email'));
                $user->login(new Password($post->get('password')));

                $session->set('id',    $user->getId());
                $session->set('email', $user->getEmail());


                $server->redirect('/');

            } catch (LoginException $exception) {
                $this->dataCollection->add('error', 'Incorrect login or password!');
                $hasError = true;
            }
        }

        $this->dataCollection->add('email', $email);
        $this->dataCollection->add('hasError', $hasError);

        $this->setThemeLayoutTemplate($this->userLayoutPath . '/Login');

        return $this->getResponse('Login');
    }