public function login($user,$password,$storeCookie=false) {
        $this->user=$user;
        $this->password=$this->encrypt($password);
        $this->uid=$this->genUID();
        //$this->other=$other;
        if (call_user_func($this->loginFn,$this)) {
            $this->fixSession($storeCookie && $this->useCookie);
            return true;
        } else {
            @session_destroy();
            @session_write_close();
            $this->isLogged=false;
            return false;
        }
    }