Check and handle login failure in the examples provided for using this library. This is a common error condition that should be handled by any script using this library.