Cleaned up old code

Removing unused code for name changes, refactoring.

Also fixed bug in login process and suppressed debug alerts.