add user registering function; rename include/api/functions.php to include/api/user_api.php