Add authorization for votes controller
refactoring