Whenever making glue connections between two pieces of wood, one must guard against excessive glue run-out, particularly when the finish on the woodworking project will be a stain or other clear finish.
Any glue that runs out onto exposed surfaces will likely fill the pores of the wood, which will prevent the stain from seeping into those glue-filled pores. This will appear as splotches in the stain of the finished project, which will be quite obvious to anyone looking at the piece. Of course, trying to wipe up the glue as soon as it runs will help, but doesn't always get all of the glue out of the pores. Additionally, you run the risk of spreading the glue instead of picking it up, making the problem worse.
Another strategy is to allow the glue to dry, then try to gently cut or scrape it out. Once again, this isn't likely to get all of the glue out of the wood's pores, leaving behind the same finishing problem.
There is a simple trick one can use to nearly eliminate the problem, particularly on mortise and tenon joints. After dry-fitting the tenon into the mortise, before applying any glue, line all corresponding edges of the mortise piece and the tenon piece with masking tape or blue painter's tape. By applying tape to all surfaces adjacent to the joint, any glue that runs out will be squeezed out onto the tape and not the bare wood surrounding the joint.
Keep in mind that this is not a license to "over glue" the joint. One should still be careful to use just enough glue in the mortise and tenon joint to hold the joint, but not so much that it will squeeze out excessively.
After the joint has been clamped and allowed to dry, simply peel off the tape and your bare, yet protected wood along the edge of the joint will be clean and ready for staining.