Fix retrieving access token when multiple tokens are stored

Change-Id: If42b8b0a4e1eafa6f0958aaf9919cbbb464cebee
diff --git a/NEWS.md b/NEWS.md
index 5f6b221..99b437f 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,6 @@
+## Bug Fixes
+- fixed retrieval of access token when multiple access tokens are stored
+
 # RKorAPClient 0.6.1
 
 ## Changes
diff --git a/R/KorAPConnection.R b/R/KorAPConnection.R
index 8d5a366..9c5a141 100644
--- a/R/KorAPConnection.R
+++ b/R/KorAPConnection.R
@@ -129,7 +129,7 @@
                                    warning = function(w) invokeRestart("muffleWarning"),
                                    error = function(e) return(NULL)),
                           error = function(e) { })
-  if (KorAPUrl %in% keyList)
+  if (KorAPUrl %in% keyList$username)
     key_get(accessTokenServiceName, KorAPUrl)
   else
     NULL