<commit_before>var express = require('express');
var router  = express.Router();

router.get('/login', function(req, res) {
    res.render('login', { title: 'Log in' });
});

module.exports = router;<commit_msg>Login route for POST, that authenticates users.<commit_after>var express  = require('express');
var router   = express.Router();
var passport = require('../app/passport');

router.get('/login', function(req, res) {
    res.render('login', { title: 'Login' });
});

router.post('/login', passport.authenticate('local', {
    successRedirect: '/projects',
    failureRedirect: '/login',
    failureFlash:    false
}));

module.exports = router;
{'fraction_non_alphanumeric': 0.1883614088820827, 'fraction_numerical': 0.0, 'mean_word_length': 4.7368421052631575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '179549', 'n_tokens_mistral': 198, 'n_tokens_neox': 191, 'n_words': 45}