update code for route and loginpage