PHP Authentication Security
md5 usage may be okay on small projects, but it's generally considered weak and shouldn't be used. As of the MD5 wikipedia page:


  The security of the MD5 hash function is severely compromised.


and http://us1.php.net/md5


  It is not recommended to use this function to secure passwords, due to the fast nature of this hashing algorithm.


So perhaps you should look into PHP's other hashing methods, say hash() itself. You can read more here: http://us1.php.net/manual/en/function.hash.php

Important Edit:

I read a little bit more and I am incorrect! The hash method is okay. It's not great like bcrypt! I highly suggest you read both of these and understand them, I'm sure it will come in handy later on! https://security.stackexchange.com/questions/17421/how-to-store-salt and https://security.stackexchange.com/questions/211/how-to-securely-hash-passwords. And directly relating to PHP, http://us1.php.net/manual/en/function.password-hash.php