@EventHandler
    public void login(PlayerLoginEvent ple) {
    	MemberManager memberManager = Citadel.getMemberManager();
    	memberManager.addOnlinePlayer(ple.getPlayer());

    	String playerName = ple.getPlayer().getDisplayName();
    	Member member = memberManager.getMember(playerName);
    	if(member == null){
    		member = new Member(playerName);
    		memberManager.addMember(member);
    	}
    	
		PersonalGroupManager personalGroupManager = Citadel.getPersonalGroupManager();
		boolean hasPersonalGroup = personalGroupManager.hasPersonalGroup(playerName);
		GroupManager groupManager = Citadel.getGroupManager();
    	if(!hasPersonalGroup){
			String groupName = playerName;
			int i = 1;
    		while(groupManager.isGroup(groupName)){
    			groupName = playerName + i;
    			i++;
    		}
        	Faction group = new Faction(groupName, playerName);
    		groupManager.addGroup(group);
    		personalGroupManager.addPersonalGroup(groupName, playerName);
    	} else if(hasPersonalGroup){
    		String personalGroupName = personalGroupManager.getPersonalGroup(playerName).getGroupName();
    		if(!groupManager.isGroup(personalGroupName)){
    			Faction group = new Faction(personalGroupName, playerName);
    			groupManager.addGroup(group);
    		}
    	}
    }