Use a login handler instead of a listener