<commit_before>const models = require('../models');
const Account = models.Account;

const loginPage = (req, res) => {
	res.render('login');
};

const signupPage = (req, res) => {
	res.render('signup');
};

const logout = (req, res) => {
	req.session.destroy();
	res.redirect('/');
};

const login = (request, response) => {

	var request = req;
	const response = res;

	const username = `${req.body.username}`;
	const password = `${<PASSWORD>}`;

	if(!username || !password){
		return res.status(400).json({error: "RAWR.  All fields are required."});
	}

	return Account.AccountModel.authenticate(username, password, (err,account) => {
		if(err || !account){
			return res.status(401).json({error: "Wrong username or password"});
		}

		req.session.account = Account.AccountModel.toAPI(account);

		return res.json({redirect: '/maker'});
	});
};

const signup = (request, response) => {

	var req = request;
	var res = response;

	req.body.username = `${req.body.username}`;
	req.body.pass = `${req.<PASSWORD>}`;<commit_msg>Naming variables is hard, CircleCI is harder<commit_after>const models = require('../models');
const Account = models.Account;

const loginPage = (req, res) => {
	res.render('login');
};

const signupPage = (req, res) => {
	res.render('signup');
};

const logout = (req, res) => {
	req.session.destroy();
	res.redirect('/');
};

const login = (request, response) => {

	var req = request;
	const res = response;

	const username = `${req.body.username}`;
	const password = `${<PASSWORD>}`;

	if(!username || !password){
		return res.status(400).json({error: "RAWR.  All fields are required."});
	}

	return Account.AccountModel.authenticate(username, password, (err,account) => {
		if(err || !account){
			return res.status(401).json({error: "Wrong username or password"});
		}

		req.session.account = Account.AccountModel.toAPI(account);

		return res.json({redirect: '/maker'});
	});
};

const signup = (request, response) => {

	var req = request;
	var res = response;

	req.body.username = `${req.body.username}`;
	req.body.pass = <PASSWORD>}`;
{'fraction_non_alphanumeric': 0.195274831243973, 'fraction_numerical': 0.0057859209257473485, 'mean_word_length': 4.375647668393782, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '4486447', 'n_tokens_mistral': 726, 'n_tokens_neox': 697, 'n_words': 161}