Fix error when invalid data of authentication