public function write($username, $password) {
        $time = time();

        $cookie = array();
        $cookie['username'] = base64_encode($username);
        $cookie['password'] = base64_encode($password);
        $cookie['hash'] = $this->Auth->password($username . $time);
        $cookie['time'] = $time;

        if (env('REMOTE_ADDR') === '127.0.0.1' || env('HTTP_HOST') === 'localhost') {
            $this->Cookie->domain = $this->cookieLocalDomain;
        }

        $this->Cookie->write($this->cookieName, $cookie, true, $this->expires);
        $this->debug('cookieSet', $cookie, $this->Auth->user());
    }