Throw 401 unauthorized when validation of user fails