Fixed a pseudo-random deviceID upon login

When logging in towards logindatabase a pseudorandom device ID is
generated.