<commit_before>import couchdb
from flask import Flask, render_template, request
from flask import request

import flask as fl

app = fl.Flask(__name__)

couch = couchdb.Server()

couch = couchdb.Server('http://127.0.0.1:5984/')

db = couch['test1'] # existing

loggedIn = 0

user = {'username': 'Miguel'}

@app.route("/")
def root():
	if(loggedIn==0):
		return render_template("index.html", loggedOut="loggedOut")
	return render_template("index.html", home="home", user=user)

@app.route('/name', methods=["GET", "POST"])
def login():
	name = fl.request.values["userinput"]
	password = <PASSWORD>.values["password"]
	for id in db:
		doc = db[id]
		if(doc['username']== name):
			if(doc['password']== password):
				global loggedIn
				loggedIn = 1
				return '/'
			if(doc['password']!= password):
				return '/Error/Invalid Password'
	return '/Error/User Not Found'

@app.route('/register', methods=["GET", "POST"])<commit_msg>Eighth Commit: Display Current User Information from Database on Home Page<commit_after>import couchdb
from flask import Flask, render_template, request
from flask import request

import flask as fl

app = fl.Flask(__name__)

couch = couchdb.Server()

couch = couchdb.Server('http://127.0.0.1:5984/')

db = couch['test1'] # existing

loggedIn = 0

cur_doc = ""

user = {'username': 'Miguel'}

@app.route("/")
def root():
	if(loggedIn==0):
		return render_template("index.html", loggedOut="loggedOut")
	return render_template("index.html", home="home", cur_doc=cur_doc)

@app.route('/name', methods=["GET", "POST"])
def login():
	name = fl.request.values["userinput"]
	password = fl.request.values["password"]
	for id in db:
		doc = db[id]
		if(doc['username']== name):
			if(doc['password']== password):
				global loggedIn
				loggedIn = 1
				global cur_doc
				cur_doc = db[id]
				return '/'
			if(doc['password']!= password):
				return '/Error/Invalid Password'
	return '/Error/User Not Found'

@app.route('/register', methods=["GET", "POST"])
{'fraction_non_alphanumeric': 0.17501264542235712, 'fraction_numerical': 0.014162873039959535, 'mean_word_length': 4.766763848396502, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1712386', 'n_tokens_mistral': 734, 'n_tokens_neox': 669, 'n_words': 168}