Well if you are looking for a javascript documentation, whichis indeed the best way to start off with javascript, then netscape.com is your choice.
I would reccomend, that you implement a sysztem similar to what Gerrit wrote. I would, however, create three tables
1 User
2 Moderator
3 Admin
Upon login I would create a drop down box which asks
are you: user, moderator, admin ?
The drop down box actually only verifies which table you wish to look data up in
Then you simply look up if Username && passwort exist in the database.
It is important, that you md5(pass) the passwort.
I hope that helps you.