Hey there buddy, I used to have trouble with my front boardslides, but here are some tips that helped me.
First up, approach the rail parallel with a decent amount of speed. Speed is the key. The more speed you have, the greater your margin for error if you don't come off perfectly straight (easier to turn the last 90 degrees coming off the rail). It also makes those long boardslides easier, as you spend less time balancing on the rail.
As you pop onto the rail, try to land with the middle of your board over it. bend your knees slightly as you ease into the slide and look over your front shoulder to spot the landing.
If you're coming out forward, shift your weight slightly to your tail and prepare to un-twist your hips. As you near the end of the rail, turn your hips and your shoulders back so they're parallel with the rail again. Your board will follow. To come out fakie, I find it easier to keep my weight more over the rail (on the nose) and turn as if I'm landing a backside 180.
Hope that helped
