This is not the place to put such code samples. The application sample
depends on which servlet container you're running.
I recommend you to read
java.sun.com/.../Security5.html
and look for your specific environment configuration (e.g. Tomcat) to
deploy your "simple and secure login system."