fixed signin logic error