fix problem of exception at login