user.class.php dumps json error type to logs if it occurs