fix login crash