support old style authentication temporarily; fix some errors