Refactored authservice more to a style of my preference