Added login result check.