Used DAO to save email preferences.

Fixed some angular stuff for email preferences.