Code cleanup and removed some logging that leaked user passwords to the logs.