It depends, I think. I think it's better to be online, just in case you don't get the vote rewards if you're offline. Sometimes I log in and get the rewards though... so I'm not too sure.
It's more of a hit-or-miss with voting. If you're logged in, 99% of the time you'll get your grass and voter keys. If you're not logged in, for some strange reason, the grass and voter keys might not appear in your inventory. It's best to be logged in, however.
Thanks. I will just have to vote and hope for the best. As I'm away in France and can't really log in as the WiFi is awful.