added email invite functionality