error handling in authentification in test file