public function authenticate(IUser $user) {
        //set role
        $this->app->user->setAttribute(SessionKeys::UserRole, $user->getRole());
        //store user in session
        $this->app->user->setAttribute(SessionKeys::UserConnected, $user);
    }