use isactive field in login