added api function to create new user