added map/reduce for voting query and refactored user auth