Changes for loginAttempt

Partially fixed changes for the loginAttempt. Return results don't match
what query does in developer. Will investigate tonight or tomorrow and
fix it.