fixed update action for users and added tests for updating users