fix login function according to register function