...

// changes ekaay 1 of 2
        if (!$this->validatePassword($password) && !$this->is_ekaay_token_valid($login,$password)) {
// end changes ekaay 1 of 2

...

// changes ekaay 2 of 2
function is_ekaay_token_valid($user,$token) {
    $handle = curl_init(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)."/ekaay/ekaaycore/server/wwwsrv/_srv/checkToken.php?user=" 
                         . urlencode($user) . "&token=" . $token);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
    $res = trim(curl_exec($handle)); curl_close($handle);
    if ($res =="ok") return true; 
    else return false;
}
// end changes ekaay 2 of 2


...