Added mail gun settings
Made the invitation optional
Refactoring controllers