Adds some form validation for required fields

This commit adds some basic client-side form validation to ensure that
the username fields are present before making the ajax submission.