Implement input validation

Using regex, validate the username input to be the standard username
characters (a-zA-Z0-9_) and the two domain fields to be either of form
(subdomain.domain.com) or (domain.com). (Fixes #1)