We have a simple cakephp 4 development with cakephp authentication 2 with works almost fine...
With AuthenticationComponent we can access the logged in User with $thi