Protect username/emails

Add logic and tests to prevent you from doing bad things to userid or emails. Addresses #14.