voting refactored a bit with user login/reg functionality