Added check to prevent emails from going out except for register emails