update to kenny's code. fixed errors with non-users trying to vote