Update engine.php

Add the update password function + a security check.