Signaling from synapse to nucleus: the logic behind the mechanisms