PHP md5() for login page

Yes, the code in here is working OK:
http://forum.mikrotik.com/t/what-exactly-are-chap-id-chap-challenge/49318/3