added functionality to invite users