Add validations to capsule app

The PR checks for validations wrt the subdomain and api token required fields. If the required fields are present it checks for their correctness.
@avinasha Wouldn't return true also return from the validate method without checking for valid_credentials ?