Bug fix in the Auth component, update unit tests