Bug fixes and login changes