There are a few different reasons you may end up with gluey mashed potatoes.  First, double check that you used a starchy potato such as Russets or Yukon golds.  Second, make sure to start potatoes cooking with cold water rather than hot or warm.  Last, don’t over mix or mash the potatoes for too long.