fixed voting and added checks for duplicate usernames