Set $_SESSION['authUser']=$user, $_SESSION['authProvider']=getAuthGroup($user) and removed $authgroup query.