def login_user(self, username, password, ip, lobby_id, user_id, cpu, local_ip, country):
		name = username.lower()
		lanadmin = self._root.lanadmin
		now = int(time.time())
		if name == lanadmin['username'].lower() and password == lanadmin['password']:
			user = User(lanadmin['username'], password, 0, False, 'admin', None, now, ip, now, country, 0)
			return True, user
		elif name == lanadmin['username'].lower():
			return False, 'Bad username/password'
			#return False, 'Invalid password.'
		
		user = self.clientFromUsername(name)
		if not user:
			return False, 'Bad username/password'
			#return False, 'No user named %s.'%username
		
		good, reason = self.check_ban(user.username, ip, user_id)
		if not good:
			return False, 'Banned: %s' % reason
		
		if not password == user.password:
			return False, 'Bad username/password'
			#return False, 'Invalid password.'
		
		user.last_login = now
		user.last_ip = ip
		user.last_id = user_id
		return True, user
dataset/ETHPy150Open lunixbochs/uberserver/tasserver/LegacyUsers.py/UsersHandler.login_user/original