some fix on login&reg