Added redirection for index page if you authorized.