Authentication not working - getting started / bookmarks app

Hi all,

I’m very new to CakePHP and this i my first post / question - whoop whoop.

I’ve been working through the quick start guide fairly quickly to create the bookmark app. I’ve been following it precicely and am up to ‘enabling registrations’.

When I try and login to the app at localhost/cake1/bookmarks/login sometimes but not all the time I am returned to localhost/cake1 rather than localhost/cake1/bookmarks

Any idea what the problem is?
Where should I start in trying to investigate this?
I have been lazily flying through the bookmarks tutorial and have not fully got my head around the structure of cakePHP so if I had maybe I would be able to troubleshoot this myself but thought I would put the question on here as an expert might be able to answer it in seconds :–)

thanks for your help

AppController.php ‘Auth’ component configuration:

 'loginRedirect' => ['controller' => 'pages',  'action' => 'index'],
 'unauthorizedRedirect' => ['controller' => 'pages', 'action' => 'index'],

Thanks for your help Diego!