In Wakanda 2 the method setLoginListener is removed (deprecated after v11, http://doc.wakanda.org/home2.en.html#/Wakanda%20Studio/0.Beta/setLoginListener.301-871936.en.html). Unfortunately the documentation does not state which method(s) should be used instead. Or has this feature been completely abandoned?
directory.setLoginListener is replaced by directory.setLoginManager. you can find the documentation here setLoginManager