throwing an error if the username field is empty