I am new in websites development and working on my first project. I am creating a registration module in which i have various of fields some are mandatory and others are not mandatory. I want to know what types of check should i perform while managing registration module, and how many other fields should be inserted into database for record of user's identification apart from user's registration form. So that in future if something bad happens than i would have sufficient data of user. And also on login process, how to make login module more secure and should i update database in each login ? Just i want to know all these basic information about user's registration and login module so that i would give my client a quality product.
Use log table for every action and client and server side validation is needed for registration