Consolidate jsonproxy.php and register.php