Suspicious login detection
Detect suspicious logins without blocking customers.
Hard block rules stop attackers and real users in the same breath. The better approach is a risk score: let clean logins through, step up only when something looks off, and block only the clear attacks.
The false-positive problem
Most login-security rules are binary: block a new country, block after N failures, block an unknown device. Each rule you add to catch more attackers also catches more real customers — the business traveler, the person on a new phone, the household sharing an IP. Tighten the rules and support tickets spike; loosen them and fraud gets through.
The way out is to stop making allow/deny decisions on single factors. Score the whole login instead, and reserve the harshest response for the smallest, riskiest slice of traffic.
Why binary rules backfire
- One unusual factor triggers a block for a real customer.
- Attackers rotate IPs and devices to slip past fixed rules.
- CAPTCHAs and forced blocks drive real users to support.
- You cannot tune a yes/no rule the way you tune a score.
Score, then respond in proportion
LoginLlama returns a 0-10 risk score for every login. Map the score to a graduated response so the friction a customer sees is proportional to the actual risk of their login.
Low risk (0-4)
Allow the login
The device, network, and location line up with the account history. Let the customer straight in — no challenge, no friction.
Medium risk (5-7)
Step up, don’t block
Something is off — a new device or an unusual location. Ask for MFA or email verification instead of denying access.
High risk (8-10)
Block or hold
Clear credential stuffing, impossible travel, or a high-risk network. Block the attempt or hold it for review.
One call, then you decide
Send the login to LoginLlama before you create the session and branch on the score. Notice there is no hard block for medium risk — that is the whole point.
// npm install loginllama
import { LoginLlama } from 'loginllama';
const loginllama = new LoginLlama({
apiKey: process.env.LOGINLLAMA_API_KEY
});
app.post('/login', async (req, res) => {
const result = await loginllama.check(req.body.email, {
request: req // auto-detects IP + user agent
});
// High risk: block the clear attacks only
if (result.risk_score >= 8) {
return res.status(403).json({ error: 'Login blocked' });
}
// Medium risk: step up instead of blocking a possible real user
if (result.risk_score >= 5) {
return res.json({ challenge: 'mfa', reasons: result.risk_codes });
}
// Low risk: let the customer straight in
res.json({ success: true });
});How this keeps false positives low
Blend many weak signals into one score instead of tripping on any single factor
Reserve hard blocks for the top of the risk range only
Use step-up MFA as the default response to uncertainty
Keep per-account history so a customer’s normal behavior is not treated as new
Fail open so an outage never blocks legitimate logins
Log reason codes so you can tune thresholds with real data
Where LoginLlama fits
LoginLlama gives you the risk score that makes graduated responses possible. It combines device fingerprinting, IP reputation, impossible-travel, and behavioral signals into one number, in under 100ms, and fails open. Try it on a single login with the Login Risk Checker, or see pricing.
Detecting suspicious logins without blocking customers FAQ
What is the best way to detect suspicious logins without blocking customers?
The best way to detect suspicious logins without blocking customers is to replace hard allow/deny rules with a risk score. Score every login 0-10, let low-risk logins through untouched, step up to MFA or email verification only for medium-risk attempts, and block only the highest-risk ones. That graduated response catches attackers while leaving the vast majority of real customers completely unfriendly.
How do I detect suspicious logins?
Detect suspicious logins by evaluating the context of each attempt — device, IP reputation, location, impossible travel, login velocity, and the account's own history — at the moment it happens. LoginLlama returns a 0-10 risk score and reason codes from one API call so you can react before the session is created.
Why do login security rules block so many real customers?
Static rules like "block logins from a new country" or "block after N failures" are binary, so they treat a traveling customer the same as an attacker and generate false positives. Risk scoring blends many weak signals into one number, so a single unusual factor rarely trips a block on its own — which is how you keep genuine users flowing while still stopping fraud.
Does step-up authentication annoy customers?
Only if you overuse it. When you gate step-up on a risk score, the challenge appears for a small slice of logins — the ones that actually look risky. Everyone else signs in normally. Because LoginLlama fails open, a service outage never turns into a wall of unnecessary challenges either.
Less friction, less fraud
Catch suspicious logins without blocking real customers
Score every login and respond in proportion — allow, step up, or block.