Moved the New User dialogue into a function.

newuser