Fix always getting "bad_request"

With the prior code, I was always receiving a "bad_request" even when
the client_id was correctly in the database. i.e. @client was not nil, but bad_request was still raised.