ReauthHandler integrated into api.Open.

Replace function type with interface. Add unit test demonstrating
api.Open can negotiate a login with reauthentication challenge response.