Added invitations logic working via emails