Whatever you do, don't look at the end of the rail, and put as little pressure as possible on your front foot. If you slide right foot forward, all your weight should be on your left foot, and vice versa.
Also make sure that you lean over and bend at the waist, this is how you make rails look steezy and it will help you stay on them longer. I also recommend learning lipside first as it sets you up better for your stance once you're on the rail.
Good luck, and have fun!