public function generateLoginToken(
        array $redirectUrl = null,
        string $expireInterval = '1 day',
        bool $addRememberMeCookie = true
    ): string {
        $data = [
            'url' => $redirectUrl,
            'timestamp' => Time::now()->toUnixString(),
            'expireInterval' => $expireInterval,
            'addRememberMeCookie' => $addRememberMeCookie
        ];
        $serializedData = serialize($data);
        $token = Security::encrypt($serializedData, $this->getKey(), $this->getSalt());

        return base64_encode($token);
    }