If the incorrect details are used, for e.g. wrong password. Instead of returning an error, a PHP error is thrown, it might be better to return an error rather than PHP showing an error, that way a user response to that the credentials are wrong can be shown, rather than a PHP thrown error.
If I get time, I'll have a look at doing a PR for this.