Voting not allowed and player redirected if he or she uses back button to access voting page

Could possible be made more efficient since it requires database query for each vote.
just do a single if:
if (gameInfo && !host)