fix login crash issue