api v1/v2 token-based detection
support home directories via ~ expansion
add support for HipChat Server (BtF); cleans up errors