<commit_before>/*jslint node: true */
'use strict';
var scopedLogger = require('./scopedLogger');
var request = require('request');

var signedInRoute = function(req, res, next){
	if(req.session.signedIn === undefined || req.session.signedIn === false){

		if(req.query.appid && req.query.streamid && req.query.readToken)
		{
			req.session.referrer = {
				appId: req.query.appid,
				streamId: req.query.streamid,
				readToken: req.query.readToken,
				version: req.query.version
			};

			req.session.shouldRegisterStream = true;
			req.session.streamRegistered = false;
		}
		
		res.render('index');
	}<commit_msg>when the user comes from an email, redirect directly to the login page<commit_after>/*jslint node: true */
'use strict';
var scopedLogger = require('./scopedLogger');
var request = require('request');

var signedInRoute = function(req, res, next){
	if(req.session.signedIn === undefined || req.session.signedIn === false){

		if(req.query.appid && req.query.streamid && req.query.readToken)
		{
			req.session.referrer = {
				appId: req.query.appid,
				streamId: req.query.streamid,
				readToken: req.query.readToken,
				version: req.query.version
			};

			req.session.shouldRegisterStream = true;
			req.session.streamRegistered = false;
		}

		if(req.query.email){
			getAuthCode(req, res, next);
			return;
		}
		
		res.render('index');
	}
{'fraction_non_alphanumeric': 0.1500732064421669, 'fraction_numerical': 0.0, 'mean_word_length': 3.813380281690141, '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': '4690486', 'n_tokens_mistral': 512, 'n_tokens_neox': 447, 'n_words': 91}