$userSession = \OC_User::getUserSession(); //or whatever this gets replaced with in OCP
    $userSession->listen('postLogin', array('OC\Cache\File', 'loginListener'))

Note that the event argument are not based as associative array anymore