made email into a module to be used in other parts of the system. Also corrected some parts in the add new user code.

Activate user used to automatically log in the user if they were an
experimenter