From what I can see, it relies on the variable $hidden_hash_var, which resides on the 3rd line. This is an internal password.
Within the functions, hash is compared with id_hash. hash is
$hash=md5($user_name.$hidden_hash_var);
In english, a MD5 (one-way encryption) hash of the users user_name and the hidden hash value.
To forge a cookie which will log a user in, the hidden_hash_var value will have to be known. If that is found out, then anyone can login as anyone.
Hope you understand