public boolean login(String account_name, String password)
	{
		connection.sendTCP(new LoginRequest(account_name, password));
		
		// Wait for an answer. If none arrives, return false.
		long start = System.currentTimeMillis();

		while(!loggedIn)
		{
			long waitedFor = System.currentTimeMillis()-start;
			if(waitedFor > 5000) // timeout
			{
				return false;
			}
			Utils.sleep(1);
		}
		return true;
	}