Law, institutions and democracy