Authentication check added