Add form validation and loading spinner