Fixed bug where if authentication failed the plugin would not retry.