Storing members to database and retrieving