authentication error handling - close #3