when the user class authenticates the login it starts a session variable, the idea being when returning control back to index.php it sees the session variable has been set and acknowledges the user.
the problem is that the 'header' command isn't doing anything, I thought it would go back to index.php but instead I just get a blank screen (or just 'authenticated!' if I uncomment it)
how can I make it go back to index.php or what approach do I need to make it work
Consider adding error_reporting(E_ALL); to your scripts. It will save you a lot of trouble because you will be able to see many things that PHP might be hiding from you in its default condition of Notice suppression.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_2391-PHP-login-logout-and-easy-access-control.html
Consider adding error_reporting(E_ALL); to your scripts. It will save you a lot of trouble because you will be able to see many things that PHP might be hiding from you in its default condition of Notice suppression.