Hi, I need a secure account system on my website with the following functionality:

Register (ID, PW, Email, simple confirmation code)
Send username/password to email

Log in
Change password
Log out

Read/write the information from MSSQL database with MD5
The website will be hosted on a VPS along with the DB.

Any help with this would be much appreciated. I am not making any profit from the website.