issue 1253 - prevent multiple logins with same username

Resolves #1253 
I think this last `return` is wrong, it should be `return true` and there should be a `return false` inside the `if` above it, to match the function description.