Catch some errors in register.php