fixed bug at register and login