register and login fixes