Change in the code for chapter 7

After a successful login, go to the index instead of logging to the console.