added ajax voting

also added flash messages for ajax