Further work on email notifications

Now a message is send to users if their account type changes.