Added checking if page matches home page or root route and to change url to app root