Added API sample for regstering user

Added API sample for regstering user