Add test for mixed case email and improve before_save callback