I found a typical one that was brought forward from the NB 5.5 days and seems to work. It does not have a login but you will get some ideas from it.
It has a simple form on the index page and gets data for a select box.
Now I also have a AJAX validation project but does not use MySQL. But that form would help. It requires a user input.
I have also taken this course and you may find something there useful:
http://www.javapassion.com/j2ee/the NB tutes are:
http://www.netbeans.org/kb/60/web/mysql-webapp.htmland
http://www.netbeans.org/kb/55/mysql-webapp.htmlThey're very similar.
Good Luck!