As mentioned at (Troubleshoot Custom Databases) you can use console.log
statements to troubleshoot custom database scripts alongside the Webtask Real-time Logs extension.
In this particular case it would be relevant to know the exact user profile that is returned as part of your login script. You can share it here after redacting/obscure the values of the properties. For example, it would be important to confirm if by any chance the profile returned contains a blocked
property as that is used as means to block a user.