Login function added to servlet.