changed restricted redirect route and remove FOUC