Added new API function and custom attributes

Added lookup_user_id_by_email  function and the ability co pass custom
attributes to the user xml