As a note on using md5()
if you just run a md5() on you password then you risk that a hacker just bruteforces his way to the passwords with a simple loop.
I'm most of my systems I have a secret serverside password which I then hash with the user password. Like this:
$user_pwd = "something";
$server_pwd = "something else";
$hashed_md5_pwd = md5($user_pwd.$server_pwd);
this way the hacker would have to know the serverside password before he could start bruteforcing the user password. Needless to say you should keep the serverside password well secured out of the webdirectory.
Furthermore I use substr() to only use a piece (15 chars in the example below) of the $hashed_md5_pwd because when displayed in the URL a 32 character string can take up alot of space - so like this:
$new_hashed_md5_pwd = substr($hashed_md5_pwd,10,15);
I'm not a security-geek or anything but I'm aware of the problems and I think this solutions will deter most newbies from hacking this way.