added initial test, updated for better config.auth checking
added tests, cleaned up errors in code