 In form-based authentication, the HTML code of a login form is returned in the server response when the application tries to access a protected resource.  Although form-based authentication is best suited for desktop and web environments, where you actually display and use the returned login form, you can also use this authentication mode in mobile applications.  To use form-based authentication, you must use a login module to validate the received credentials.  In this module, you implement a simple form-based authentication mechanism that is based on a user name and a password.