Added an e-mail option to the register function