JS redirect to login path when vote without login