change ssh check to check for logged in users rather than connections