fix email logic bugs
Merge branch 'master' of https://github.com/umass-cs-326/team-undefined