refactored before_save and added test for mixed case email