Made it so you can connect to localhost again

Also security functions do a log in the case of incorrect input and at
startup.