# Test login with provided credentials
$loginBody = @{
    tenantCode = "T202605253515"
    username = "admin"
    password = "FFuxUo5bC^ui"
} | ConvertTo-Json

Write-Output "=== Testing Login ==="
try {
    $resp = Invoke-RestMethod -Uri "http://localhost:8006/company/login" -Method POST -ContentType "application/json" -Body $loginBody
    Write-Output "Login response code: $($resp.code)"
    Write-Output "Login msg: $($resp.msg)"
    if ($resp.token) {
        Write-Output "Token obtained: $($resp.token.Substring(0,20))..."
    }
} catch {
    Write-Output "Login error: $_"
}
