 
 app.get '/profile/id/:id/', (request, response) ->
 	id = parseInt request.param('id'), 10
-	chars = lib.game.getUserCharacters.sync null, mysqlConnection, id
+	chars = lib.game.getUserCharacters.sync null, dbConnection, id
 	if chars is null
 		throw new Error '404'
 	options = request.uonline.basicOpts


app.get '/action/logout', (request, response) ->
	# TODO: move sessid to uonline{}
	lib.user.closeSession mysqlConnection, request.cookies.sessid, (error, result) ->
		if error?
			response.send 500
		else

	request.uonline.basicOpts = {}
	request.uonline.basicOpts.now = new Date()
	sessionData = lib.user.sessionInfoRefreshing.sync(null,
		dbConnection, request.cookies.sessid, config.sessionExpireTime)
	request.uonline.basicOpts.loggedIn = sessionData.sessionIsActive
	request.uonline.basicOpts.login = sessionData.username
	request.uonline.basicOpts.admin = sessionData.admin
