In Return of the Jedi, when trying to sneak into the base on a shuttle, Luke said he senses Darth Vader's presence and said he shouldn't have come lest he jeopardize the mission. Darth Vader also sensed Luke, but let him in anyways. Also, Yoda and Obi-Wan could detect the Force in young Anakin.
So if Jedi and Sith can detect each other, why couldn't they detect Senator Palpatine to begin with? It seems like a giant plot hole.