Great work! Only criticism is the passwords are stored in plain text, you should at least MD5 them and maybe even add salt.