register and login changes to fix errors