Better handling of failed authentication
release 0.4.1