Implemented the logged in variable in local storage and created a protected service for restricted routes