When logging in with faulty username/password, login returns success. No exception, nothing.
With first attempt to start whatever operation, this operation returns with an exception HTTP 401.
There is no way for the application programmer to really find out the root cause of the problem.
No none exception provides ANY information what really went wrong.