GUACAMOLE-547: Relocate NULL check and log when NONE succeeds.
diff --git a/src/common-ssh/ssh.c b/src/common-ssh/ssh.c
index 2763840..7691bf5 100644
--- a/src/common-ssh/ssh.c
+++ b/src/common-ssh/ssh.c
@@ -318,12 +318,17 @@
     /* Get list of supported authentication methods */
     char* user_authlist = libssh2_userauth_list(session, username,
             strlen(username));
+
+    /* If auth list is NULL, then authentication has succeeded with NONE */
+    if (user_authlist == NULL) {
+        guac_client_log(client, GUAC_LOG_DEBUG,
+            "SSH NONE authentication succeeded.");
+        return 0;
+    }
+
     guac_client_log(client, GUAC_LOG_DEBUG,
             "Supported authentication methods: %s", user_authlist);
 
-    /* If auth list is NULL, then authentication has succeeded with NONE */
-    if (user_authlist == NULL)
-        return 0;
 
     /* Authenticate with private key, if provided */
     if (key != NULL) {