Robust Auth & Session Logic
"Enterprise-grade login system utilizing bcrypt, explicit status codes, and httpOnly cookie security."
router.post('/login', async (req, res) => {
const { email, password } = req.body;
try {
const user = await User.findOne({ email });