The conditions able to alkylate the phenols (base, alkyl halide, heat) will also be able to alkylate the nitrogen, causing polymerization or other side-reactions. For the methylenation to work, you need to protect the nitrogen with a suitable amine protection group (for example by making the BOC-amide, which is easily cleaved by acid afterwards).