Give the right exception when there is an invalid user