Bug fix 3 in login code

Fixed incorrect attribute call.