Fixed the register and login bugs.