Reworked how ip logins work.

There was a bug with auto login.