Improved date validation & password encryption