public boolean doLogin(xAuthPlayer xp) {
		int accountId = xp.getAccountId();
		String ipAddress = xp.getIPAddress();
		Timestamp currentTime = new Timestamp(System.currentTimeMillis());

		try {
			// create account if one does not exist (for AuthURL only)
			if (plugin.getConfig().getBoolean("authurl.enabled") && accountId < 1) {
				accountId = createAccount(xp.getPlayerName(), "authURL", null, ipAddress);
				xp.setAccountId(accountId);
				xp.setStatus(Status.Registered);
			}

			if (plugin.getConfig().getBoolean("account.track-last-login"))
				updateLastLogin(accountId, ipAddress, currentTime);

			// insert session if session.length > 0
			if (plugin.getDbCtrl().isTableActive(Table.SESSION))
				createSession(accountId, ipAddress);

			// clear strikes
			plugin.getStrkMngr().getRecord(ipAddress).clearStrikes(xp.getPlayerName());

			unprotect(xp);
			xp.setLoginTime(currentTime);
			xp.setStatus(Status.Authenticated);
			return true;
		} catch (SQLException e) {
			xAuthLog.severe("Something went wrong while logging in player: " + xp.getPlayerName(), e);
			return false;
		}
	}