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.
this can be 

def validate
  return validate_presence_of_required_fields
  return true if valid_credentials?
  errors[:flash] = "Invalid subdomain and/or API Token. Please verify the entered details"
  false
end