isAuthorized improvements

Use libssh2_userauth_authenticated instead of the "authorized" variable.