Created newUser function.