Rough working of frontend
Added more error checking to votes route