diff --git a/server/endpoints/system.js b/server/endpoints/system.js
index 9012768100e92e86c08060af95ca80e48f59f0d8..2e0eda844af26a063fd587cdbe42007d14930f21 100644
--- a/server/endpoints/system.js
+++ b/server/endpoints/system.js
@@ -105,7 +105,7 @@ function systemEndpoints(app) {
 
       if (await SystemSettings.isMultiUserMode()) {
         const { username, password } = reqBody(request);
-        const existingUser = await User.get({ username });
+        const existingUser = await User.get({ username: String(username) });
 
         if (!existingUser) {
           await EventLogs.logEvent(
@@ -125,7 +125,7 @@ function systemEndpoints(app) {
           return;
         }
 
-        if (!bcrypt.compareSync(password, existingUser.password)) {
+        if (!bcrypt.compareSync(String(password), existingUser.password)) {
           await EventLogs.logEvent(
             "failed_login_invalid_password",
             {