added user invitations but still needs some cleaning up