Made CreateNewUser.php into a class and modified it a bit.