fixed unlogged users from routing to profile pages

now when someone who is not logged in tries to visit a profile page, they are redirected to :root