Fixed some issues and removed legacy login