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

	options.instance = 'register'
	usernameIsValid = lib.validation.usernameIsValid(request.body.user)
	passwordIsValid = lib.validation.passwordIsValid(request.body.pass)
	userExists = lib.user.userExists.sync(null, mysqlConnection, request.body.user)
	if (usernameIsValid is true) and (passwordIsValid is true) and (userExists is false)
		lib.user.registerUser.sync(
			null
			mysqlConnection
			request.body.user
			request.body.pass
			config.PERMISSIONS_USER

	unless request.uonline.basicOpts.loggedIn
		response.redirect '/login/'
	else
		lib.game.goAttack.sync null, dbConnection, request.uonline.basicOpts.userid
		response.redirect '/game/'


