partially complete the register command just need to figure out the mail routines.