Validations, redirect and alert messages done for register