Added API function to insert user

Added API function to insert user