Fixed login check.

Fixed first if statement since return code values changed.