setting up userlist function in frontend