Refractored and removed auth package, fixed tests