Fix error reporting during authentication phase

JAVA-82 #fixes