Minor updates to common.py

This change does the following:
- bails if a combination of username/api-key or auth_token/api-url are
  not provided
- changes variable assignment to group assignment by configuration
  section