E-mail confirmation functionality

Not completely tested
confirm merge prep