 		response.render 'register', options
 
 
-app.get '/login/', mustNotBeAuthed, (request, response) ->
-	quickRender request, response, 'login'
-
-
 app.post '/login/', mustNotBeAuthed, (request, response) ->
 	if lib.user.accessGranted.sync null, dbConnection, request.body.user, request.body.pass
 		sessid = lib.user.createSession.sync null, dbConnection, request.body.user


app.get '/explode/', (request, response) ->
	throw new Error 'Emulated error.'


# real ones

quickRender = (request, response, template) ->
	options = request.uonline.basicOpts
	options.instance = template
	response.render template, options


quickRenderError = (request, response, code) ->
	options = request.uonline.basicOpts
	options.code = code
	options.instance = 'error'
	response.status code
	response.render 'error', options


app.get '/', (request, response) ->

sync = require 'sync'


# Connect to database
dbConnection = anyDB.createPool config.DATABASE_URL, min: 2, max: 20
dbConnection.query 'SELECT version()', [], (error, result) ->
	if error?
