Added login check.