added error handling in create user
deleted extra json.php