added more specific error reporting in user.php