[IM] Allowing to specify auth email type.
[IM] Tidying up
Merge branch 'im-auth-emails'