works on making side bar not show up when it's not supposed to and restricts access to non registered users