Use delegate for login_failed.

Signed-off-by: François de Metz <francois@stormz.me>