Add methods for changing user roles to index and User.class controller

Ok, after changing $http.post to $http.put it worked correctly.