modified method of view login page when access the protected page.