public int login(String name, String password){
        if (name.equals("") || password.equals("")) return -1;
        int id = db.getUserId(name);
        if(id != -1){
            if(db.getPassword(id).equals(password)){
                if (!MFServer.SERVER.isClientOnline(id)){
                    return id;
                }
                return -2;
            }
        }
        return -1;
    }