I cannot exactly know, what do you encrypt using md5 on both client and server side because I cannot download your announced javascript. But I think that using md5 or other hash-functions is not necessary and does not enhance the safety in this case - when you are thinkinkg about some random strings serving the same role as passwords, the hashed random strings have the same role... The only one tip is to use https to avoid the man in the middle.