Login failure bug fix

This fixes OC-2
This #fixes #OC-2