DeprecationWarning

Fix for deprecation warning. Originally found in Kronuz's fork.
Avoided use of cookies with authenticated users

It led to database errors (duplicate key when voting)
Also added reusable cookie name and content generators