Added invitation features

TO DO: Check and test that it is working flawlessly.