Fix 500 when a service provider tries to authorize a device in client_mode