Use built in Servoy security for webclient

I have an app that is accessed via Smart Client, but I would like to allow access to some users via the Webclient. I’m using custom security that gets the user’s Windows user name and compares against a Users table. Since the webclient cannot determine the username, is there any way to use Servoy’s built in user and groups when a user accesses via Webclient, but keep my Login\Authenticator for Smart Client users?

For webclient, security.getSystemUserName() returns “System”. So I’ve played around with this in the Login method but haven’t had much luck. The webclient allows all users in regardless of username\password.

I’m trying to avoid using LDAP since I’m in a very large corporation and don’t have the access to do that.

if (security.getSystemUserName()=="system")
	{		
	if (security.authenticate(null,null,[userName, password]))
 	     {  
 	      security.login(userName, userName, ['Administrators']) 	       
	      return true;
 	     }
 	     else 
 	    {
 	    	errorMessage = "No tenant found. Please check your password";
 	    } 	
	}
	else
	{
		if (security.authenticate("myAuthenticator","loginUser",[userName]))
 	    { 	     
 	        return true;
 	    }
 	    else 
 	    {
 	    	errorMessage = "No tenant found. Please check your password";
 	    } 	
	}

Why not just asking the user to enter their username?
You can still validate against users table.
If validation returned a positive result, you could store the username in cookie or local storage and use it the next time.