added email devise and email notifications refactor