Implementing invite logic