allow modules to change login behaviour