First of all: Welcome to the Horse Forum.
I have helped a lot of young people get horses started on trail obstacles. It is very common for people to get horses frantic when they start trying to work the pole, the "L" back-through and the gate. It is ALWAYS from using too much rein and asking for 'too much' in the beginning when just getting started on these obstacles. Rearing at the gate and going into the "L" are even more common than the side-pass over the log. With 40 years of being a 4-H leader, I have only seen this about a hundred times.
It is easiest to teach in increments before you try to put it all together to actually do the obstacle.
First of all, before you ask a horse to side-pass over a pole or to a gate (especially closing a gate), teach them to 'leg yield 'while going forward. This means that you use your left leg at the same time you take the horse's head slightly to the left and ask him to move diagonally to the right WHILE GOING FORWARD. This teaches a horse to 'yield to your leg pressure' but does not put him in a bind where he feels the only way to get away from your leg is to go up or backwards.
Once a horse moves off of your legs pressure to the right and to the left while going forward, you should be able to have him stand in one place and ask him to do a turn on the 'forehand'. If a horse is pretty much 'forward', I have found it much, MUCH easier to do this at first with a person on the ground holding the horse still so the rider can use less rein. Always remember that it is much easier and better for the horse to move off of your leg pressure while his head is a straight in front of him as possible. The less 'bend' he has toward your dominant leg -- the better.
The easiest way to teach the side-pass over the log is to step over the log about 2 or 3 feet from the end of it. Stop the horse with his front feet on one side of it and his hind feet still on the other side of it. Let him stand still and 'settle' until he is completely relaxed. Don't 'get after' him at all if he goes too far or gets nervous. If he keeps trying to not stop with his hind feet on one side of the log, again, have someone hold his head. When I help a horse what has gotten really frantic and spoiled on the log or back-through, I do not ask them to do it until they settle down completely. I will even have the rider go to the log, step half-way over it and dismount there when they put the horse up for the day. I'll have them do that until the horse has gotten over all the anxiety of it.
Back to the log. When the horse will quietly stand 2 or 3 feet from the end of it with the log under his belly, quietly and 'lightly' ask him to side-pass the short distance until you are off of the log. If he will stand still when he is done, that is a lot better. Then just let him stand for a minute or two, dismount and put him up.
When you side-pass a log, try to keep the log directly under the point where your back cinch is (or would be). Most people start with it too close to the horse's front feet.
Always, keep the horse's body at a slight angle when side-passing. The horse's position should be where his front end is angled a little bit ahead of his beck end so that he always steps over in front of his other feet as he steps sideways. You want to 'set him up where he always steps in fron of and never behind his other feet as he goes sideways.
When the horse will side-pass 2 or 3 step, just keep going a little farther each time. DO NOT do it over and over and over. Once or twice and then dismounting there when he is quiet, will work the best.
I teach the "L" the same way. I have the rider walk the horse forward into the "L" two or three steps and then back out. Little by little, the horse learns that the "L" is a nice place too be. Again, I have the student dismount there when we are through. I make sure the horse is OK with all parts of the "L" before I let the student start at the front of it and back into it. I also make sure the "L" is wide when they first start doing it.
I have had several students win the trail classes at the State 4-H show and have had several qualify for the AQHA Youth World in trail and this is how I taught all of them to do it. It is worth the time it takes to do it this way so that horses do not get anxious and dread trail obstacles.