Anytime you are working with laser light you need to be careful with respect to exposure of a beam to your eyes. This is particularly true if you collimate the beam as this will result in the lens of your eye bringing it to a sharp focus with poassible instantaneous retinal damage. The third lead is for an optical sensing photodiode used to regulate power output when used in a feedback circuit which controls your current. However, the power curve is extremely non-linear. You can easily destroy a laser diode by exceeding the safe current even for an instant.
Laser diodes are also extremely static sensitive, so use appropriate precautions.
Also, do not try to test them with a VOM which could on the low ohms scale supply too much current. It is possible to drive laser diodes with a DC supply and resistor, but unless you know the precise value needed, you can easily exceed the ratings. V range rather than 1.7-2.5 V for the laserdiode. So, for the test below if you get a forward voltage drop of under a volt, you are on the photodiode leads. If your voltage goes above 3 V, you have the polarity backwards.