Added basic email/password restrictions

I'd like to expand the current validation system a little (so that you can define several validation tests for each field nicely and you can report to the user all errors at once instead of only one per validation attempt) but that goes in another commit.