make login handling a bit more robust